aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Gregory <james@james.id.au>2013-05-20 17:27:36 -0700
committerJames Gregory <james@james.id.au>2013-05-20 17:27:36 -0700
commit4c649e4fad8cd3329f082579f80e2086c698ea51 (patch)
tree8813b75b389a632da99263ec141545ba2f50c14e
parent6346adec3b5f59415d9eb9650eeefd4120f32763 (diff)
According to http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.pdf, 0 is the only value for the loop argument that does not cause looping on Mix_PlayMusic. Update Emscripten's implementation to respect this.
-rw-r--r--src/library_sdl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 75544765..24883295 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1450,7 +1450,7 @@ var LibrarySDL = {
loops = Math.max(loops, 1);
var audio = SDL.audios[id].audio;
if (!audio) return 0;
- audio.loop = loops != 1; // TODO: handle N loops for finite N
+ audio.loop = loops != 0; // TODO: handle N loops for finite N
if (SDL.audios[id].buffer) {
audio["mozWriteAudio"](SDL.audios[id].buffer);
} else {