Open Bug 2020377 Opened 9 months ago Updated 19 days ago

Implement AudioContextOptions latencyHint

Categories

(Core :: Audio/Video: Web Codecs, defect, P3)

defect

Tracking

()

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(3 external files)

No description provided.
See Also: → 1713046

These are mochitests rather than WPT tests because they test Gecko-specific
behaviour (graph sharing, ChromeOnly callbackBufferSize/mediaTrackGraphId
attributes, and cross-graph impulse latency).

The Web Audio API AudioContextOptions.latencyHint controls the audio
callback buffer size requested from cubeb. Three categories are defined:

  • Interactive: lowest latency, uses the default MTG latency (from cubeb)
  • Balanced: ~10ms, computed as RoundUpPow2(sampleRate / 100)
  • Playback: highest latency, uses the platform's playback latency

A custom positive double (in seconds) is also accepted and converted to
frames. All values are rounded to the nearest multiple of the Web Audio
render quantum (128 frames) at AudioContext construction time, and stored
as a plain uint32_t frame count in MediaTrackGraph.

Graph sharing: two AudioContexts with the same {window, sampleRate,
outputDevice, latencyHint} key share a single MediaTrackGraph.

These are mochitests rather than WPT tests because they test Gecko-specific
behaviour (graph sharing, ChromeOnly callbackBufferSize/mediaTrackGraphId
attributes, and cross-graph impulse latency).

The severity field is not set for this bug.
:padenot, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(padenot)
Severity: -- → S3
Flags: needinfo?(padenot)
Priority: -- → P3
See Also: → 2087455
See Also: → 2087144
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: