Bug 219975

Summary: [macOS] Use low-power audio buffer sizes for more output devices
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, peng.liu6, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
eric.carlson: review+
Patch for landing none

Description Jer Noble 2020-12-16 21:38:52 PST
[macOS] Use low-power audio buffer sizes for more output devices
Comment 1 Jer Noble 2020-12-16 21:39:25 PST
<rdar://problem/72391280>
Comment 2 Jer Noble 2020-12-16 22:04:45 PST
Created attachment 416388 [details]
Patch
Comment 3 Jer Noble 2020-12-16 22:28:40 PST
Created attachment 416392 [details]
Patch
Comment 4 Eric Carlson 2020-12-17 06:23:04 PST
Comment on attachment 416392 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416392&action=review

> Source/WebCore/platform/audio/AudioHardwareListener.cpp:42
> +    m_supportedBufferSizes = { 32, 4096 };

Can you initialize this in the header?

> Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:72
> +        return { 0, 0 };

Wouldn't `return { }` do the same?

> Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:84
> +        return { 0, 0 };

Ditto.
Comment 5 Jer Noble 2020-12-17 10:36:09 PST
(In reply to Eric Carlson from comment #4)
> Comment on attachment 416392 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=416392&action=review
> 
> > Source/WebCore/platform/audio/AudioHardwareListener.cpp:42
> > +    m_supportedBufferSizes = { 32, 4096 };
> 
> Can you initialize this in the header?

I didn't really want to put a conditional variable initializer in the header.

> > Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:72
> > +        return { 0, 0 };
> 
> Wouldn't `return { }` do the same?

Probably!

> > Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:84
> > +        return { 0, 0 };
> 
> Ditto.
Comment 6 Jer Noble 2020-12-17 11:30:34 PST
Created attachment 416441 [details]
Patch for landing
Comment 7 EWS 2020-12-17 13:33:38 PST
Committed r270943: <https://trac.webkit.org/changeset/270943>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416441 [details].