-
Notifications
You must be signed in to change notification settings - Fork 138
Add enable_queue for AudioSourceOptions. #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enable_queue for AudioSourceOptions. #353
Conversation
maxbrunsfeld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey, yes, there is a bug here, I created another PR to fix it
#360
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.