Closed Bug 1736481 Opened 3 years ago Closed 3 years ago

Iterate the MTG `0` frames when `AudioCallbackDriver::mBuffer::Available()` returns `0`

Categories

(Core :: Audio/Video: MediaStreamGraph, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1654112

People

(Reporter: chunmin, Assigned: pehrsons)

References

Details

Attachments

(1 obsolete file)

Per comment here: https://phabricator.services.mozilla.com/D123840?id=478060#inline-707634, when AudioCallbackDriver::mBuffer::Available() returns 0, the MTG should be iterated by 0 frame.

In bug 1654112 there is D102650 that does exactly this. It was paired with D102578 which is essentially an alternative solution to D123840, but with the guarantees discussed there.

D102578 ended up not landing on elm because it conflicted with D123840 during a rebase. I'll look into incorporating it into this bug instead.

Depends on: 1654112
Assignee: nobody → apehrson

The new AudioProcessingImpl, and in particular AEC3 it seems, is more picky on
the ordering here. After an ApplyConfig() it needs ProcessStream() to properly
set up its internals. ProcessReverseStream sets off various asserts, for
instance because the processing sample rate is not divisible by 16k if
ProcessReverseStream() was fed 44.1k.

This patch defers the parameters passed by NotifyInputData so they can be
processed during ProcessInput, which is after ControlMessages have run.
The lifetime of these parameters, in particular the buffer, is guaranteed by
AudioCallbackDriver.

We can revisit this when bug 1741959 is done.

Depends on: 1741959

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:pehrsons, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(padenot)
Flags: needinfo?(apehrson)

With the work Chun-Min is doing on decoupling the input from audio processing (this is going from 1 joint track to 2 separate ones) we'll be getting the gist of D102578 for free. It comes naturally since the audio processing track won't have a NotifyInputData.

And since bug 1654112 we are already iterating the graph on every callback, which was the main point of this bug.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(padenot)
Flags: needinfo?(apehrson)
Resolution: --- → DUPLICATE
Attachment #9248711 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: