public void PauseSource(IALSource source) { AL10.alSourcePause((source as OpenALSource).Handle); #if VERBOSE_AL_DEBUGGING CheckALError(); #endif }
public void Pause() { if (INTERNAL_delayMS > 0) { INTERNAL_timer.Stop(); } if (INTERNAL_alSource != 0 && State == SoundState.Playing) { AL10.alSourcePause(INTERNAL_alSource); } }
public void SetAllSoundsPaused(bool paused) { foreach (var key in sourcePool.Keys) { int state; AL10.alGetSourcei(key, AL10.AL_SOURCE_STATE, out state); if (state == AL10.AL_PLAYING && paused) { AL10.alSourcePause(key); } else if (state == AL10.AL_PAUSED && !paused) { AL10.alSourcePlay(key); } } }
public void PauseSound(ISound sound, bool paused) { if (sound == null) { return; } var key = ((OpenAlSound)sound).Source; int state; AL10.alGetSourcei(key, AL10.AL_SOURCE_STATE, out state); if (state == AL10.AL_PLAYING && paused) { AL10.alSourcePause(key); } else if (state == AL10.AL_PAUSED && !paused) { AL10.alSourcePlay(key); } }
void PauseSound(uint source, bool paused) { AL10.alGetSourcei(source, AL10.AL_SOURCE_STATE, out var state); if (paused) { if (state == AL10.AL_PLAYING) { AL10.alSourcePause(source); } else if (state == AL10.AL_INITIAL) { // If a sound hasn't started yet, // we indicate it should not play be transitioning it to the stopped state. AL10.alSourcePlay(source); AL10.alSourceStop(source); } } else if (!paused && state != AL10.AL_PLAYING) { AL10.alSourcePlay(source); } }
public virtual void Pause() { AL10.alSourcePause(Source); Check(); }
public void PauseSource(IALSource source) { AL10.alSourcePause((source as OpenALSource).Handle); }
/// <summary> /// Pause this source. /// </summary> public void Pause() { CheckDisposed(); Context.MakeCurrent(); AL10.alSourcePause(Name); }