Okay, I’ve searched around everywhere and I can’t find a solution tot he issue i’m hving except for people saying to use soundmixer.stopAll, which isn’t a solution at all in this instance.
I have a character that uses the arrow keys to move. Key_Down sends him 10px left or right per press and when you let go he stops. easy as pie. What I’ve now added in is that when you press either of those keys it also plays a “walk” sound.
In order to stop this walk sound I then added Key_Up and specified that the sound should stop via SndChannel.stop();
At first it was working fine, but there was the issue that if you held down a directional button the sound would spawn multiple times and sound like crap. I added in a boolean to disallow this, making it so that only one isntance will play at a time and it will loop.
The problem now is, however, that the initial SndChannel.stop(); under the Key_Up listener has stopped working. Instead of stopping the sound immediately on key up, it waits until the sound file has finished and simply stops it from repeating.
If you need my code I’d be ahppy to post it, but at first I’m simply looking for suggestions instead of straight out fixes, as I’d like to actuallydo the work, not have it done for me. That’s how we learn, you know?