public override void QueueBuffer(AudioBuffer buffer)
        {
            SoundIoAudioBuffer driverBuffer = new SoundIoAudioBuffer(buffer.DataPointer, GetSampleCount(buffer));

            _ringBuffer.Write(buffer.Data, 0, buffer.Data.Length);

            _queuedBuffers.Enqueue(driverBuffer);
        }
示例#2
0
        public override void QueueBuffer(AudioBuffer buffer)
        {
            lock (_lock)
            {
                SoundIoAudioBuffer driverBuffer = new SoundIoAudioBuffer
                {
                    DriverIdentifier = buffer.DataPointer,
                    SampleCount      = GetSampleCount(buffer),
                    SamplePlayed     = 0,
                };

                _ringBuffer.Write(buffer.Data, 0, buffer.Data.Length);

                _queuedBuffers.Enqueue(driverBuffer);
            }
        }