Closed
Bug 921365
Opened 11 years ago
Closed 11 years ago
on underrun in initial read from AudioStream, output 0's first, then any real audio
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 919215
People
(Reporter: jesup, Assigned: padenot)
Details
(Whiteboard: [getusermedia])
If we underrun on the initial read (to fill the cubeb buffers) of AudioStream, it outputs X samples of real audio, then aFrames-X samples of 0's. This is not good and will cause a startup glitch.
After
uint8_t* rpos = static_cast<uint8_t*>(aBuffer) + FramesToBytes(aFrames - underrunFrames);
we want something like this (mHasRun is a bool to tell us if this is the first time we've fed data from the DataCallback)
Note: memmove, not memcpy!
if (!mHasRun) {
// underrun on initial read - output 0's *first*, then real audio to avoid glitch
memmove(rpos, static_cast<uint8_t*>(aBuffer), FramesToBytes(aFrames - underrunFrames));
rpos = static_cast<uint8_t*>(aBuffer);
}
Assignee | ||
Comment 1•11 years ago
|
||
This is somewhat handled by my work in progress patch for bug 919215.
Assignee | ||
Comment 2•11 years ago
|
||
Yes, this is handled in bug 919215, which has been fixed and is now on central.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•