fix(mod_conference): prevent garbage data in mixer output causing audio distortion#3026
Open
zhouhailin wants to merge 1 commit into
Open
Conversation
…io distortion Fix three bugs in the conference audio mixer that cause corrupted samples to be injected into the mixed audio stream (issue signalwire#3024): 1. Off-by-one in self-subtraction bounds check (x <= read/2 -> x < read/2) that reads one sample past valid data in the member's frame buffer. 2. Missing bounds check in relationship subtraction loop that accesses imember->frame[x] without verifying x is within imember->read range, causing stale data from previous mixer cycles to be mixed in. 3. Off-by-one in file data bounds check (x <= file_sample_len -> x <) that reads one sample past valid file audio data. Additionally, zero the remainder of member frame buffers after partial reads as defense-in-depth against any residual stale data. Closes signalwire#3024
Contributor
|
Important to note that in our case, it's not the garbage that gets inserted by the conference mixer, but the silence packets. Because there is no data from the input thread. |
Contributor
|
Tried the proposed fix from the pull request and, as expected, it didn't fix the issue. Since the root cause of the problem is erroneously detecting no input audio from the conference members, and consequently inserting 'silence' packets into the output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fix
: allx <= read/2->x < read/2)imember->readcorrectly bounded by subtraction paths now actual bytes read
x < omember->read / 2Closes #3024