Closed Bug 983023 Opened 6 years ago Closed 4 years ago

AudioNodeExternalInputStream (MediaElementAudioSourceNode/MediaStreamAudioSourceNode) inserts zero samples into the stream

Categories

(Core :: Web Audio, defect, P1)

26 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(1 file)

This seems to happen because there is not enough resampled data when the input stream can have varying numbers of samples in each block.

The attachment adds an assertion to detect this as well as removing speex_resampler_skip_zeros, so that the resampler produces output immediately instead of blocking for a period, which might have triggered the assertion even when failures were harmless.

Perhaps bug 818822 might make the resampling here unnecessary.
Blocks: 989907
This assertion, "Should be first", is still failing even though no resampling is happening here now.

At 44100 Hz, the graph time delta for each block oscillates between 3043 and 3044.
The absolute graph time values are chosen so that rounding up to ticks will produce an interval of 128 ticks.

However, the start tick and number of ticks collected for the input(s) is
determined from rounding stream times.  Rounding stream times up to ticks can
mean that input block sizes fluctuate between 127, 128, and 129 ticks.
No longer depends on: 818822
Blocks: 999267
Depends on: 1023697
Karl - is this still relevant?  Should we keep this a p1, or drop it to p2 or p3?  (I set the rank to 15 based on the current P1, but I suspect it's either P2 or P3).  Thanks
Rank: 15
Flags: needinfo?(karlt)
I suspect this was fixed in bug 1023697.
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(karlt)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.