cocos2d/cocos2d-html5 — pull request #1798 by NatWeiss (2014-04-23 16:20:46+00:00)
Title: Fixes bug in stopMusic()

In Chrome, it can take a few seconds for the `ended` property of music to become `false`. Therefore if one plays music, then immediately stops the music, `_stopAudio` can silently fail and then `stopMusic` mistakenly sets `_currMusic` to `null`, which leaves the music playing and no way to stop it. The problem is compounded if this situation is repeated. There can be many music tracks playing and it slows down the browser tremendously.

This pull request fixes the bug by verifying that `_stopAudio` worked.