diff options
author | C. Scott Ananian <cscott@laptop.org> | 2008-11-17 22:08:57 (GMT) |
---|---|---|
committer | C. Scott Ananian <cscott@laptop.org> | 2008-11-17 22:08:57 (GMT) |
commit | 937c78e7408a5d26dac8ddad784e76add55a16cb (patch) | |
tree | c3a99e637156d4119b2ee79d3be3950360c2de78 /library | |
parent | cceaa369918b77f5849237d60bb4b8d58d363aab (diff) |
Allow playing sounds named with a full filesystem path.
Diffstat (limited to 'library')
-rwxr-xr-x | library/pippy/sound.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/pippy/sound.py b/library/pippy/sound.py index f496c93..0818bd0 100755 --- a/library/pippy/sound.py +++ b/library/pippy/sound.py @@ -151,7 +151,10 @@ def playPluck( pitch=100, amplitude=5000, duration=2, starttime=0, pitch_envelop def playWave(sound='horse', pitch=1, amplitude=1, loop=False, duration=1, starttime=0, pitch_envelope='default', amplitude_envelope='default'): """Play a wave file (sound = ['horse'], pitch = [1], amplitude = [1], loop = [False], duration = [1], starttime = [0], pitch_envelope=['default'], amplitude_envelope=['default'])""" - fullname = finddir() + str(sound) + if '/' in sound: + fullname = sound + else: + fullname = finddir() + str(sound) if loop == False: lp = 0 else: lp = 1 |