Open Bug 2002450 Opened 4 months ago Updated 22 days ago

Remove AudioDestinationNode audio output from its MediaTrack when the node has had no active input for a period of time

Categories

(Core :: Web Audio, enhancement)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: karlt, Assigned: karlt)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

The audio output requires an audio stream to an audio output device, which means powering up the device and starting high priority threads with frequent wake-ups. This is unnecessary while the node has no active input.

The process of (re-)adding the output, when the destination node has an active input, has the complication that the audio output device takes time to start up while the MediaTrackGraph keeps advancing time. In order to ensure that the output device can produce all of the non-silent audio generated by the AudioDestinationNode (and doesn't miss the start or all of the audio), the MediaTracks associated with the same AudioContext can be suspended for a short time and resumed when the stream to the audio output device is running. This can use some of same mechanism as used to suspend and resume an AudioContext.

Depends on: 2002453
Blocks: 1984881
You need to log in before you can comment on or make changes to this bug.