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);
        }
Ejemplo n.º 2
0
        public override void QueueBuffer(AudioBuffer buffer)
        {
            EnsureAudioStreamSetup(buffer);

            SDL2AudioBuffer driverBuffer = new SDL2AudioBuffer(buffer.DataPointer, GetSampleCount(buffer));

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

            _queuedBuffers.Enqueue(driverBuffer);
        }
Ejemplo n.º 3
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);
            }
        }