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/dynamicmusic.py')
-rw-r--r--extern/audaspace/bindings/python/examples/dynamicmusic.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/extern/audaspace/bindings/python/examples/dynamicmusic.py b/extern/audaspace/bindings/python/examples/dynamicmusic.py
new file mode 100644
index 00000000000..348e2496c0a
--- /dev/null
+++ b/extern/audaspace/bindings/python/examples/dynamicmusic.py
@@ -0,0 +1,20 @@
+import aud, sys, time
+
+device=aud.Device()
+dMusic = aud.DynamicMusic(device)
+sound1 = aud.Sound.file(sys.argv[1])
+sound2 = aud.Sound.file(sys.argv[2])
+effect = aud.Sound.file(sys.argv[3])
+
+dMusic.addScene(sound1)
+dMusic.addScene(sound2)
+dMusic.addTransition(1,2,effect)
+
+dMusic.fadeTime=3
+dMusic.volume=0.5
+
+dMusic.scene=1
+time.sleep(5)
+dMusic.scene=2
+
+time.sleep(500) \ No newline at end of file