Example #1
0
        public void PauseSource(IALSource source)
        {
            AL10.alSourcePause((source as OpenALSource).Handle);
#if VERBOSE_AL_DEBUGGING
            CheckALError();
#endif
        }
Example #2
0
 public void Pause()
 {
     if (INTERNAL_delayMS > 0)
     {
         INTERNAL_timer.Stop();
     }
     if (INTERNAL_alSource != 0 && State == SoundState.Playing)
     {
         AL10.alSourcePause(INTERNAL_alSource);
     }
 }
Example #3
0
 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);
         }
     }
 }
Example #4
0
        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);
            }
        }
Example #5
0
 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);
     }
 }
Example #6
0
 public virtual void Pause()
 {
     AL10.alSourcePause(Source); Check();
 }
Example #7
0
 public void PauseSource(IALSource source)
 {
     AL10.alSourcePause((source as OpenALSource).Handle);
 }
Example #8
0
 /// <summary>
 /// Pause this source.
 /// </summary>
 public void Pause()
 {
     CheckDisposed();
     Context.MakeCurrent();
     AL10.alSourcePause(Name);
 }