Commit d22bdf2f authored by Ilya Prokhorov's avatar Ilya Prokhorov

mp3 compatibility layer

parent fed3368a
......@@ -44,8 +44,10 @@ void Music::play() {
EM_ASM_({
var audioPath = Pointer_stringify($0);
audioPath += ".mp3";
var audio = new Audio(audioPath);
audio.loop = true;
audio.play();
}, path->c_str());
......
......@@ -66,6 +66,7 @@ void Sound::play() {
EM_ASM_({
var audioPath = Pointer_stringify($0);
audioPath += ".mp3";
var audio = new Audio(audioPath);
audio.play();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment