diff options
author | Nathanaël Lécaudé <natcl@hotmail.com> | 2007-08-29 00:07:30 (GMT) |
---|---|---|
committer | Nathanaël Lécaudé <natcl@hotmail.com> | 2007-08-29 00:07:30 (GMT) |
commit | 1457178256ce8b46e250b396d8b506613f68a089 (patch) | |
tree | c799fa1fa567fe08ac7080edbdbd76587089ff52 /data | |
parent | ab9ddea50be9228dc433e65a19d1ed9a98a77dcb (diff) |
getSoundList and path fixes
Diffstat (limited to 'data')
-rw-r--r-- | data/sound/getSoundList | 7 | ||||
-rw-r--r-- | data/sound/playSine | 4 | ||||
-rw-r--r-- | data/sound/playWave | 4 | ||||
-rw-r--r-- | data/sound/sequence | 4 | ||||
-rw-r--r-- | data/sound/sndInfo | 4 |
5 files changed, 19 insertions, 4 deletions
diff --git a/data/sound/getSoundList b/data/sound/getSoundList new file mode 100644 index 0000000..317ba41 --- /dev/null +++ b/data/sound/getSoundList @@ -0,0 +1,7 @@ +import sys +from sugar.activity.activity import get_bundle_path +sys.path.append(get_bundle_path() + '/sound') +from snd import * + +for sound in getSoundList(): + print sound
\ No newline at end of file diff --git a/data/sound/playSine b/data/sound/playSine index 8cda42e..a641b72 100644 --- a/data/sound/playSine +++ b/data/sound/playSine @@ -1,6 +1,8 @@ import sys -sys.path.append('/usr/share/activities/Pippy.activity/sound') +from sugar.activity.activity import get_bundle_path +sys.path.append(get_bundle_path() + '/sound') from snd import * + playSine() audioOut() diff --git a/data/sound/playWave b/data/sound/playWave index 659710a..471ca31 100644 --- a/data/sound/playWave +++ b/data/sound/playWave @@ -1,6 +1,8 @@ import sys -sys.path.append('/usr/share/activities/Pippy.activity/sound') +from sugar.activity.activity import get_bundle_path +sys.path.append(get_bundle_path() + '/sound') from snd import * + playWave(sound='didjeridu', loop=True, duration=5) audioOut() diff --git a/data/sound/sequence b/data/sound/sequence index 683ea59..1bdc966 100644 --- a/data/sound/sequence +++ b/data/sound/sequence @@ -1,7 +1,9 @@ import sys import random -sys.path.append('/usr/share/activities/Pippy.activity/sound') +from sugar.activity.activity import get_bundle_path +sys.path.append(get_bundle_path() + '/sound') from snd import * + for i in range(25): pitch = random.randint(500,2000) amplitude = 5000 diff --git a/data/sound/sndInfo b/data/sound/sndInfo index f40accb..0a337f9 100644 --- a/data/sound/sndInfo +++ b/data/sound/sndInfo @@ -1,4 +1,6 @@ import sys -sys.path.append('/usr/share/activities/Pippy.activity/sound') +from sugar.activity.activity import get_bundle_path +sys.path.append(get_bundle_path() + '/sound') from snd import * + print playSine.__doc__ |