Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorNathanaë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)
commit1457178256ce8b46e250b396d8b506613f68a089 (patch)
treec799fa1fa567fe08ac7080edbdbd76587089ff52 /data
parentab9ddea50be9228dc433e65a19d1ed9a98a77dcb (diff)
getSoundList and path fixes
Diffstat (limited to 'data')
-rw-r--r--data/sound/getSoundList7
-rw-r--r--data/sound/playSine4
-rw-r--r--data/sound/playWave4
-rw-r--r--data/sound/sequence4
-rw-r--r--data/sound/sndInfo4
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__