stopPlayback method

void stopPlayback(
  1. SoundPlayback playback
)

Stop playback.

If SoundPlayback.channel is not Game.ambianceSounds, then the channel will be destroyed.

Implementation

void stopPlayback(final SoundPlayback playback) {
  playback.sound.destroy();
  if (playback.channel != game.ambianceSounds) {
    playback.channel.destroy();
  }
}