public void PauseSounds(bool pause)
{
if (vm.IMuse != null)
vm.IMuse.Pause(pause);
// Don't pause sounds if the game isn't active
// FIXME - this is quite a nasty hack, replace with something cleaner, and w/o
// having to access member vars directly!
if (vm.CurrentRoomData == null)
return;
_soundsPaused = pause;
if (vm.MusicEngine is IMuseDigital)
{
((IMuseDigital)vm.MusicEngine).Pause(pause);
}
_mixer.PauseAll(pause);
if (vm.Game.Features.HasFlag(GameFeatures.AudioTracks) && vm.Variables[vm.VariableMusicTimer.Value] > 0)
{
if (pause)
StopCDTimer();
else
StartCDTimer();
}
}