Exemplo n.º 1
0
        public override bool IsPlaying()
        {
            AlNative.alGetSourcei(_source, AlNative.AL_SOURCE_STATE, out int state);
            bool playing = state == AlNative.AL_PLAYING;

            return(playing);
        }
Exemplo n.º 2
0
        private void RemoveProcessed()
        {
            //before querying new data check if sth was processed already:
            AlNative.alGetSourcei(_source, AlNative.AL_BUFFERS_PROCESSED, out int processed);
            ALEngine.checkAlError();

            while (processed > 0)
            {
                var bufs = new uint[] { 1 };
                AlNative.alSourceUnqueueBuffers(_source, 1, bufs);
                processed--;
            }
        }