Bug 219975 - [macOS] Use low-power audio buffer sizes for more output devices
Summary: [macOS] Use low-power audio buffer sizes for more output devices
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-16 21:38 PST by Jer Noble
Modified: 2020-12-17 13:33 PST (History)
7 users (show)

See Also:


Attachments
Patch (8.44 KB, patch)
2020-12-16 22:04 PST, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (8.43 KB, patch)
2020-12-16 22:28 PST, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (8.41 KB, patch)
2020-12-17 11:30 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].