I need an AudioPlayer in Flutter that, even if one sound is currently playing, if I play another one, the previous one cancels and the new one goes.
This works if I do this: audioPlayer.setReleaseMode(ReleaseMode.stop);
The problem is, if I play the same asset sound twice in a row, it doesn't work; the previous one needs to end before the audioplayer plays the second one. I need this asset to sound every time I press a button, so if I spam buttons, the asset needs to play on every click.