Пример #1
0
        public SourceBuffer[] Dequeue(int buffers)
        {
            OpenAL.DebugFormat("Dequeing {0} buffers for source {1}", buffers, this.sourceID);

            uint[] bufferIDs = new uint[buffers];
            alSourceUnqueueBuffers(this.sourceID, buffers, bufferIDs);
            OpenAL.ErrorCheck();

            SourceBuffer[] dequeued = new SourceBuffer[bufferIDs.Length];
            for (int i = 0; i < bufferIDs.Length; ++i)
            {
                OpenAL.DebugFormat("Dequeued source buffer {0} for source {1}", bufferIDs[i], this.sourceID);

                dequeued[i] = SourceBuffer.GetBuffer(bufferIDs[i]);
            }

            return(dequeued);
        }
Пример #2
0
 public void QueueAndPlay(SourceBuffer buffer)
 {
     this.Queue(buffer);
     this.Play();
 }
Пример #3
0
 public void Queue(SourceBuffer buffer)
 {
     Queue(new [] { buffer.bufferID });
 }