Add enable_queue for AudioSourceOptions.#353
Conversation
maxbrunsfeld
left a comment
There was a problem hiding this comment.
This commit introduced a regression, causing distorted audio in our Rust app. The enable_queue option is not actually respected, due to a bug I mentioned above.
|
|
||
| let mut inner = self.inner.lock().await; | ||
| let mut samples = 0; | ||
| let enable_queue = self.sys_handle.audio_options().enable_queue; |
There was a problem hiding this comment.
I believe this always returns false, because the enable_queue option is not initialized explicitly in the C++ implementation of this audio_options method.
Does the enable_queue bit even need to be passed into C++? Why not just store the enable_queue as a field on the rust NativeAudioSource?
There was a problem hiding this comment.
hey, yes, there is a bug here, I created another PR to fix it
#360
There was a problem hiding this comment.
After modification, enable_queue is an optional parameter of NewAudioSourceRequest instead of AudioSourceOptions. and store the enable_queue field on the rust NativeAudioSource.
This parameter is used to avoid queues and silence frames causing latency accumulation, and is typically used when connecting to Audio Capture devices or other real-time sources.