-
Notifications
You must be signed in to change notification settings - Fork 60
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
send silence when no data is captured #272
Conversation
libwebrtc/src/native/audio_source.rs
Outdated
if inner.captured_frames > 0 { | ||
break; // User captured something, stop injecting silence | ||
if let Some(last_capture) = inner.last_capture { | ||
if last_capture.elapsed() < Duration::from_millis(20) { |
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.
20ms instead of 10?
Not sure if this is the best way to handle it but it avoid to inject silence if the user is 1ms late
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.
20ms seems fine. we would inject 10ms worth of silence?
we should have a break condition still somewhere right? when the source is destroyed?
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.
yes 10ms of silence every 10ms
blah I'm tired.. yeah I should stop the task
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 think it makes sense but I don't know enough about what this means for jitter buffer behavior. Basically every time you stop sending audio the pipeline will have 10ms of jitter introduced?
edit: nvm, so 10ms is introduced and then it immediately catches back up to whatever it considers healthy buffer size becuase we'll just send 10ms instantly after that.
No description provided.