Closed Bug 784609 Opened 13 years ago Closed 10 years ago

Need a way to flush frames from the time stretcher internal buffer when the audio loop sleeps.

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P3)

Other
Other
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: padenot, Unassigned)

Details

In bug 495040, comment 52: >@@ +650,5 @@ >> + PRUint32 framesAvailable = mTimeStretcher->receiveSamples(data, numFrames); >> + NS_ASSERTION(mTimeStretcher->numSamples() == 0, >> + "We did not get all the data from the SoundTouch pipeline."); >> + // It is possible to have nothing to write: the data are in the processing >> + // pipeline, and will be written to the backend next time. > >This ends up being quite painful, since it's possible there won't be another >Write() for a while (if the audio loop sleeps, or if we're at the end of the >stream), causing data to be truncated. The former case is difficult to handle, >since the audio stream has no knowledge of Write() scheduling. The latter we >can fix by flushing the remaining samples from SoundTouch inside Drain(). > >Given that we're trying to ditch this code and switch to nsBufferedAudioStream >(which doesn't suffer these types of problems due to using a pull model), don't >worry about fixing this if it's difficult, but please do file a followup bug so >we've got a way to track it until the code is removed. The latter case has been addressed while addressing the review comments. This bug is about the former case ("if the audio loop sleeps").
Component: Audio/Video → Audio/Video: MSG/cubeb/GMP
Still relevant?
Rank: 35
Flags: needinfo?(padenot)
Priority: -- → P3
This has moved enough, I think it's been fixed.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(padenot)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.