From 1457178256ce8b46e250b396d8b506613f68a089 Mon Sep 17 00:00:00 2001 From: Nathanaël Lécaudé Date: Wed, 29 Aug 2007 00:07:30 +0000 Subject: getSoundList and path fixes --- (limited to 'data') 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__ -- cgit v0.9.1