Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/audaspace/bindings/python/examples/randomSounds.py')
-rw-r--r--extern/audaspace/bindings/python/examples/randomSounds.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/extern/audaspace/bindings/python/examples/randomSounds.py b/extern/audaspace/bindings/python/examples/randomSounds.py
new file mode 100644
index 00000000000..113b0921f09
--- /dev/null
+++ b/extern/audaspace/bindings/python/examples/randomSounds.py
@@ -0,0 +1,21 @@
+import aud, sys, time
+
+device=aud.Device()
+sound1 = aud.Sound.file(sys.argv[1])
+sound2 = aud.Sound.file(sys.argv[2])
+sound3 = aud.Sound.file(sys.argv[3])
+sound4 = aud.Sound.file(sys.argv[4])
+list=aud.Sound.list(True)
+
+list.addSound(sound1)
+list.addSound(sound2)
+list.addSound(sound3)
+list.addSound(sound4)
+mutable=aud.Sound.mutable(list)
+
+device.lock()
+handle=device.play(mutable)
+handle.loop_count=2
+device.unlock()
+
+time.sleep(500) \ No newline at end of file