micknoise/Maxim — pull request #5 by Julien-Nicault (2014-06-16 20:52:46+00:00)
Title: Update maxim.js

According to the WebAudio spec:
“stop must only be called one time and only after a call to start or stop, or an exception will be thrown.”

In some loops where one would call cue without prior checking that start had been called, an exception would be thrown causing the audio to stop.
In earlier versions of Chrome (<31) the exception wasn't thrown, so it did work.
See https://code.google.com/p/chromium/issues/detail?id=330534#c6 for details.

Checking that the sound is playing before calling stop ensures that start had been called at least once before calling stop.