aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-27 11:59:12 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-27 11:59:12 -0700
commitb4dcd8daa2d0ac559222139f2d797b3bfd0cb148 (patch)
tree75cdcbf19d4ffe3ef3b4be73f0994c84fbd77bc6 /tests/runner.py
parent84d65c025b4581202f0972be8f479978903d80e7 (diff)
support for playing audio chunks through SDL mix
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 09f7063f..1db6d3a7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6445,6 +6445,13 @@ f.close()
Popen(['python', EMCC, os.path.join(self.get_dir(), 'sdl_mouse.c'), '-o', 'page.html', '--pre-js', 'pre.js']).communicate()
self.run_browser('page.html', '', '/report_result?740')
+ def test_sdl_audio(self):
+ shutil.copyfile(path_from_root('tests', 'sounds', 'alarmvictory_1.ogg'), os.path.join(self.get_dir(), 'sound.ogg'))
+ open(os.path.join(self.get_dir(), 'sdl_audio.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio.c')).read()))
+
+ Popen(['python', EMCC, os.path.join(self.get_dir(), 'sdl_audio.c'), '--preload-file', 'sound.ogg', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', '', '/report_result?1')
+
def test_worker(self):
# Test running in a web worker
output = Popen(['python', EMCC, path_from_root('tests', 'hello_world_worker.cpp'), '-o', 'worker.js'], stdout=PIPE, stderr=PIPE).communicate()