BufferAudioSource
class BufferAudioSource(bufferCapacityMs: Int = 1000, latencyMs: Int = 100) : AudioSource, GetMicrophoneData
Created by pedro on 17/7/26.
Audio source backed by a synthetic PCM buffer (silence) consumed at fixed intervals. Use setBuffer to replace parts of the synthetic buffer with real PCM data. Consumed regions are restored to silence, so if no data is provided silence is streamed.
Parameters
bufferCapacityMs
capacity of the synthetic buffer in milliseconds.
latencyMs
extra buffering applied to setBuffer data to absorb producer jitter. Higher values avoid dropped data and glitches with irregular producers at the cost of latency. The delay is compensated in the frame timestamps, so it produces no av desync.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard