Closed Bug 1930825 Opened 3 months ago Closed 3 months ago

Audio crackling with simple OscillatorNode demo on Android

Categories

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

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

https://share.firefox.dev/3YLQwfl is a profile from an Android device while https://onlinetonegenerator.com/ is playing a sine wave and the user is interacting with the page.

The user reported, via Matrix, occasional cracks in the audio output.

In the AudioIPC Client Callback thread in the Web Content process, the Marker Chart shows up to four "AudioCallbackDriver real-time budget" markers concurrently. That's an indication that some of them are not running on time. At 2.385s, for example, there is a DataCallback marker that is 18ms after the previous DataCallback. The budget is only 5.3ms.

The DataCallback duration is usually well within budget, but there was a 9.9ms duration at 2.267s.

The profile is slightly different from the profile of bug 1893939, which also has late DataCallback calls but has no increase in frequency of calls to catch up.

This is a simple Web Audio app, so presumably the problem can be worse for more CPU intensive apps.

There are some occasional cracks when I try to reproduce on my phone. https://share.firefox.dev/4fGm25d had some when the profiler started, which is probably expected, and one towards the end, before opening the settings menu.

I'm not clear which path Chrome uses for Web Audio but it might be using a buffer length of 10ms.

See Also: → 1893939

On the system in comment 0:
AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE=48000
AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER=192

The system in comment 1 also had a sample rate of 48000 Hz.

The cap is applied only when media.cubeb_latency_mtg_frames is not set.

Depends on: 1931080
Attachment #9437030 - Attachment description: Bug 1930825 Increase frames per data callback to at least 512 on Android r?padenot → Bug 1930825 Increase frames per data callback to at least 1024 on Android r?padenot
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/029a75f1d24d Increase frames per data callback to at least 1024 on Android r=padenot
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: