# Path: pyskool/skoolsound.py
# def create_sounds(game, odir, verbose=True, force=False, sample_rate=44100, max_amplitude=65536):
#     wrote_wavs = False
#     for sound in SOUNDS[game]:
#         delays_f, subdir, fname = FILES[sound]
#         sounds_dir = os.path.join(odir, subdir)
#         if not os.path.isdir(sounds_dir):
#             os.makedirs(sounds_dir)
#         wav = os.path.join(sounds_dir, fname + '.wav')
#         if force or not os.path.isfile(wav):
#             if verbose:
#                 print('Writing {0}'.format(wav))
#             samples = delays_to_samples(delays_f(), sample_rate, max_amplitude)
#             write_wav(samples, wav, sample_rate)
#             wrote_wavs = True
#     if verbose and not wrote_wavs:
#         print("All sound files present")
# 
# SKOOL_DAZE = 'skool_daze'
# 
# BACK_TO_SKOOL = 'back_to_skool'
# 
# SKOOL_DAZE_TAKE_TOO = 'skool_daze_take_too'
# 
# EZAD_LOOKS = 'ezad_looks'
# 
# BACK_TO_SKOOL_DAZE = 'back_to_skool_daze'


import sys
import os
from pyskool.skoolsound import (create_sounds, SKOOL_DAZE, BACK_TO_SKOOL,
                                SKOOL_DAZE_TAKE_TOO, EZAD_LOOKS, BACK_TO_SKOOL_DAZE)
#!/usr/bin/env python

# Use the current development version of Pyskool
PYSKOOL_HOME = os.environ.get('PYSKOOL_HOME')
if not PYSKOOL_HOME:
    sys.stderr.write('PYSKOOL_HOME is not set; aborting\n')
    sys.exit(1)
if not os.path.isdir(PYSKOOL_HOME):
    sys.stderr.write('PYSKOOL_HOME={0}: directory not found\n'.format(PYSKOOL_HOME))
    sys.exit(1)
sys.path.insert(0, PYSKOOL_HOME)


def parse_args(args):
    p_args = []
    verbose = True
    i = 0
    while i < len(args):
        arg = args[i]
        if arg == '-q':
            verbose = False
        elif arg.startswith('-'):
            print_usage()
        else:
            p_args.append(arg)
        i += 1

# Path: pyskool/skoolsound.py
# def create_sounds(game, odir, verbose=True, force=False, sample_rate=44100, max_amplitude=65536):
#     wrote_wavs = False
#     for sound in SOUNDS[game]:
#         delays_f, subdir, fname = FILES[sound]
#         sounds_dir = os.path.join(odir, subdir)
#         if not os.path.isdir(sounds_dir):
#             os.makedirs(sounds_dir)
#         wav = os.path.join(sounds_dir, fname + '.wav')
#         if force or not os.path.isfile(wav):
#             if verbose:
#                 print('Writing {0}'.format(wav))
#             samples = delays_to_samples(delays_f(), sample_rate, max_amplitude)
#             write_wav(samples, wav, sample_rate)
#             wrote_wavs = True
#     if verbose and not wrote_wavs:
#         print("All sound files present")
# 
# SKOOL_DAZE = 'skool_daze'
# 
# BACK_TO_SKOOL = 'back_to_skool'
# 
# SKOOL_DAZE_TAKE_TOO = 'skool_daze_take_too'
# 
# EZAD_LOOKS = 'ezad_looks'
# 
# BACK_TO_SKOOL_DAZE = 'back_to_skool_daze'


# Path: utils/create-sounds.py
import sys
import os
from pyskool.skoolsound import (create_sounds, SKOOL_DAZE, BACK_TO_SKOOL,
                                SKOOL_DAZE_TAKE_TOO, EZAD_LOOKS, BACK_TO_SKOOL_DAZE)

#!/usr/bin/env python

# Use the current development version of Pyskool
PYSKOOL_HOME = os.environ.get('PYSKOOL_HOME')
if not PYSKOOL_HOME:
    sys.stderr.write('PYSKOOL_HOME is not set; aborting\n')
    sys.exit(1)
if not os.path.isdir(PYSKOOL_HOME):
    sys.stderr.write('PYSKOOL_HOME={0}: directory not found\n'.format(PYSKOOL_HOME))
    sys.exit(1)
sys.path.insert(0, PYSKOOL_HOME)


def parse_args(args):
    p_args = []
    verbose = True
    i = 0
    while i < len(args):
        arg = args[i]
        if arg == '-q':
            verbose = False
        elif arg.startswith('-'):
            print_usage()
        else:
            p_args.append(arg)
        i += 1

    if len(p_args) != 1: