示例#1
0
 /// <summary>
 /// Fill data with samples at the given sampleRate and number of channels.
 /// </summary>
 /// <remarks>
 /// If the internal buffer overruns, the oldest data will be dropped.
 /// If the internal buffer is exhausted, the data is padded with white noise.
 /// In any case the entire data array is filled.
 /// </remarks>
 public void ReadAudio(int sampleRate, float[] data, int channels)
 {
     AudioTrackReadBufferInterop.Read(_nativeHandle, sampleRate, data, data.Length, channels);
 }
示例#2
0
        internal AudioTrackReadBuffer(PeerConnectionHandle peerHandle, int bufferMs)
        {
            uint res = AudioTrackReadBufferInterop.Create(peerHandle, bufferMs, out _nativeHandle);

            Utils.ThrowOnErrorCode(res);
        }