kripken/emscripten — pull request #1317 by michaeljbishop (2013-06-21 17:48:05+00:00)
Title: SDL mixer sound leak

Fixed bugs in SDL_Mixer implementation
1. Mix_PlayChannel silently reused channel 1 when all channels were exhausted. This meant
that the previous sound on channel 1 would continue to play (annoying if it was a looped sound)
2. Mix_PlayChannel didn't report -1 when all channels were exhausted.
3. Channels were never automatically released when their sound had finished playing and so it was very
easy to exhaust the channel allocation.

Test included.