[Webkit-unassigned] [Bug 236081] [WPE][GStreamer] Increased CPU usage on new window.AudioContext()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 10 05:24:06 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236081

--- Comment #5 from Bastian Krause <bst at pengutronix.de> ---
(In reply to Philippe Normand from comment #4)
> I'd need to check, but IIRC the AudioDestination is not explicitly created
> when the AudioContext is?
It is created. Setting..

sound_context = new window.AudioContext();
sound_context.destination.channelCount = 1;

..decreases the CPU load, because only 1 webaudioSrc feeds into the audiointerleave.

> And even so, (IIRC again :)) I think you need to
> explicitly start rendering to have the webkitaudiosrc element playing. So
> I'm not sure why you're seeing this issue...
No. With GST_DEBUG_DUMP_DOT_DIR=/some/path , I see a playing pipeline with nothing else in the DOM/javascript as in the reproducer.

The CPU load stems from the pipeline itself. This is the pipeline I came up with to reproduce the load:

gst-launch-1.0 -v audiointerleave name=i ! audioconvert ! audioresample ! alsasink audiotestsrc samplesperbuffer=128 ! queue ! "audio/x-raw,format=F32LE,layout=interleaved,rate=44100,channels=1,channel-mask=(bitmask)0x1" ! i. audiotestsrc samplesperbuffer=128 ! queue ! "audio/x-raw,format=F32LE,layout=interleaved,rate=44100,channels=1,channel-mask=(bitmask)0x2" ! i.

With GStreamer 1.20.0 (compared to 1.18.4) the CPU load is way lower. I guess this is okay, setting the channel number to "1" decreases the load (-2..5%).

So, I think this can be closed, do you agree?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220210/05b275b2/attachment.htm>


More information about the webkit-unassigned mailing list