open2jamorg/open2jam — pull request #25 by dtinth (2012-11-18 09:52:13+00:00)
Title: More fine-grained sound control

The play() method in Sound interface will now return a SoundInstance object which can be used to control that particular instance of a played sound

For now we have the stop() methods that stops the sound instance.

When the player missed the note that whose keysound is autoplayed by autosound, the autoplayed keysound will stop.

The sound also stops when the player released a long note before the note's tail, so it's more like newer games. If that isn't a good idea, then it can be disabled easily, but now we have more control over sound instances.