public void Stop(SoundChannel soundChannel, int fadeDuration) { if (((soundChannel != null) && (soundChannel.Channel != null)) && ((fadeDuration != 0) && soundChannel.IsPlaying)) { soundChannel.ImmediateFade(fadeDuration); soundChannel.WaitOnFade(); soundChannel.Channel.stop(); soundChannel.CancelFades(); } }
public void Stop(SoundChannel soundChannel, int fadeDuration) { if (soundChannel != null && soundChannel.Channel != null) { // Sound has to be playing for the volume to be set (fmod rule) if (fadeDuration != 0 && soundChannel.IsPlaying) { soundChannel.ImmediateFade(fadeDuration); soundChannel.WaitOnFade(); soundChannel.Channel.stop(); soundChannel.CancelFades(); } } }
public void Stop(SoundChannel soundChannel, int fadeDuration) { if(soundChannel != null && soundChannel.Channel != null) { // Sound has to be playing for the volume to be set (fmod rule) if(fadeDuration != 0 && soundChannel.IsPlaying ) { soundChannel.ImmediateFade(fadeDuration); soundChannel.WaitOnFade(); soundChannel.Channel.stop(); soundChannel.m_ptimer.Stop(); soundChannel.CancelFades(); } } }
public void Stop(SoundChannel soundChannel, int fadeDuration) { if (((soundChannel != null) && (soundChannel.Channel != null)) && ((fadeDuration != 0) && soundChannel.IsPlaying)) { soundChannel.ImmediateFade(fadeDuration); soundChannel.WaitOnFade(); soundChannel.Channel.stop(); soundChannel.CancelFades(); } }