import struct
OUTPUT_RATE = 8125
-MAX = 95
+DEFAULT_VOL = 95
def gen_sine(freq, secs, volume):
filename = 'beep%s.pcm' % freq
print 'Usage gen_sound <freq> [<length>] [<volume>]'
print ' where <freq> is the frequency in Hz (int)'
print ' [<length>] is the time in seconds (float) - default 0.25'
- print ' and [<volume>] is the volume (integer between 0 and 127) - default %s' % MAX
+ print ' and [<volume>] is the volume (integer between 0 and 127) - default %s' % DEFAULT_VOL
if __name__ == "__main__":
if len(sys.argv) > 3:
volume = int(sys.argv[3])
else:
- volume = MAX
+ volume = DEFAULT_VOL
except Exception, exc:
usage()
print 'Error was', exc