<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[277607] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/277607">277607</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-05-17 14:26:59 -0700 (Mon, 17 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use kAudioObjectPropertyElementMain where available
https://bugs.webkit.org/show_bug.cgi?id=224635

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-17
Reviewed by Eric Carlson.

Source/WebCore:

* platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::isAudioHardwareProcessRunning):
(WebCore::currentDeviceSupportedBufferSizes):
(WebCore::processIsRunningPropertyDescriptor):
(WebCore::outputDevicePropertyDescriptor):
* platform/audio/mac/AudioSessionMac.mm:
(WebCore::defaultDevice):
(WebCore::defaultDeviceTransportIsBluetooth):
(WebCore::AudioSessionPrivate::addSampleRateObserverIfNeeded):
(WebCore::AudioSessionPrivate::addBufferSizeObserverIfNeeded):
(WebCore::AudioSession::sampleRate const):
(WebCore::AudioSession::bufferSize const):
(WebCore::AudioSession::maximumNumberOfOutputChannels const):
(WebCore::AudioSession::setPreferredBufferSize):
(WebCore::AudioSession::isMuted const):
(WebCore::AudioSession::addMutedStateObserver):
(WebCore::AudioSession::removeMutedStateObserver):
* platform/mediastream/mac/CoreAudioCaptureDevice.cpp:
(WebCore::getDeviceInfo):
(WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
(WebCore::CoreAudioCaptureDevice::relatedAudioDeviceIDs):
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::deviceHasInputStreams):
(WebCore::deviceHasOutputStreams):
(WebCore::isValidCaptureDevice):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::computeAudioDeviceList):
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::defaultOutputDevice):

Source/WTF:

* wtf/PlatformHave.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformHaveh">trunk/Source/WTF/wtf/PlatformHave.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiomacAudioHardwareListenerMaccpp">trunk/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiomacAudioSessionMacmm">trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureDevicecpp">trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDevice.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureDeviceManagercpp">trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureSourcecpp">trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WTF/ChangeLog  2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2021-05-17  Alex Christensen  <achristensen@webkit.org>
+
+        Use kAudioObjectPropertyElementMain where available
+        https://bugs.webkit.org/show_bug.cgi?id=224635
+
+        Reviewed by Eric Carlson.
+
+        * wtf/PlatformHave.h:
+
</ins><span class="cx"> 2021-05-16  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Modernize / Optimize SQLiteStatement creation and preparation
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformHaveh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformHave.h (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformHave.h      2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -956,6 +956,7 @@
</span><span class="cx">     || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
</span><span class="cx">     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
</span><span class="cx"> #define HAVE_CFNETWORK_NSURLSESSION_ATTRIBUTED_BUNDLE_IDENTIFIER 1
</span><ins>+#define HAVE_AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN 1
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS) || PLATFORM(MACCATALYST) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/ChangeLog      2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -1,5 +1,42 @@
</span><span class="cx"> 2021-05-17  Alex Christensen  <achristensen@webkit.org>
</span><span class="cx"> 
</span><ins>+        Use kAudioObjectPropertyElementMain where available
+        https://bugs.webkit.org/show_bug.cgi?id=224635
+
+        Reviewed by Eric Carlson.
+
+        * platform/audio/mac/AudioHardwareListenerMac.cpp:
+        (WebCore::isAudioHardwareProcessRunning):
+        (WebCore::currentDeviceSupportedBufferSizes):
+        (WebCore::processIsRunningPropertyDescriptor):
+        (WebCore::outputDevicePropertyDescriptor):
+        * platform/audio/mac/AudioSessionMac.mm:
+        (WebCore::defaultDevice):
+        (WebCore::defaultDeviceTransportIsBluetooth):
+        (WebCore::AudioSessionPrivate::addSampleRateObserverIfNeeded):
+        (WebCore::AudioSessionPrivate::addBufferSizeObserverIfNeeded):
+        (WebCore::AudioSession::sampleRate const):
+        (WebCore::AudioSession::bufferSize const):
+        (WebCore::AudioSession::maximumNumberOfOutputChannels const):
+        (WebCore::AudioSession::setPreferredBufferSize):
+        (WebCore::AudioSession::isMuted const):
+        (WebCore::AudioSession::addMutedStateObserver):
+        (WebCore::AudioSession::removeMutedStateObserver):
+        * platform/mediastream/mac/CoreAudioCaptureDevice.cpp:
+        (WebCore::getDeviceInfo):
+        (WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
+        (WebCore::CoreAudioCaptureDevice::relatedAudioDeviceIDs):
+        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
+        (WebCore::deviceHasInputStreams):
+        (WebCore::deviceHasOutputStreams):
+        (WebCore::isValidCaptureDevice):
+        (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
+        (WebCore::computeAudioDeviceList):
+        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+        (WebCore::CoreAudioSharedUnit::defaultOutputDevice):
+
+2021-05-17  Alex Christensen  <achristensen@webkit.org>
+
</ins><span class="cx">         Null check m_resource in SubresourceLoader::didReceiveResponse
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=225879
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiomacAudioHardwareListenerMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp     2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp        2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -41,9 +41,13 @@
</span><span class="cx">     AudioObjectPropertyAddress propertyAddress = {
</span><span class="cx">         kAudioHardwarePropertyProcessIsRunning,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     
</span><span class="cx">     if (!AudioObjectHasProperty(kAudioObjectSystemObject, &propertyAddress))
</span><span class="lines">@@ -68,9 +72,13 @@
</span><span class="cx">     AudioObjectPropertyAddress defaultOutputDeviceDescriptor = {
</span><span class="cx">         kAudioHardwarePropertyDefaultOutputDevice,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (AudioObjectGetPropertyData(kAudioObjectSystemObject, &defaultOutputDeviceDescriptor, 0, 0, &descriptorSize, (void*)&deviceID))
</span><span class="lines">@@ -82,9 +90,13 @@
</span><span class="cx">     AudioObjectPropertyAddress bufferSizeDescriptor = {
</span><span class="cx">         kAudioDevicePropertyBufferFrameSizeRange,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster,
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (AudioObjectGetPropertyData(deviceID, &bufferSizeDescriptor, 0, 0, &descriptorSize, &bufferSizes))
</span><span class="lines">@@ -99,9 +111,13 @@
</span><span class="cx">     static const AudioObjectPropertyAddress processIsRunningProperty = {
</span><span class="cx">         kAudioHardwarePropertyProcessIsRunning,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     return processIsRunningProperty;
</span><span class="lines">@@ -112,9 +128,13 @@
</span><span class="cx">     static const AudioObjectPropertyAddress outputDeviceProperty = {
</span><span class="cx">         kAudioHardwarePropertyDefaultOutputDevice,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     return outputDeviceProperty;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiomacAudioSessionMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.mm (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.mm       2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.mm  2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -48,9 +48,13 @@
</span><span class="cx">     AudioObjectPropertyAddress defaultOutputDeviceAddress = {
</span><span class="cx">         kAudioHardwarePropertyDefaultOutputDevice,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     OSStatus result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &defaultOutputDeviceAddress, 0, 0, &infoSize, (void*)&deviceID);
</span><span class="cx">     if (result)
</span><span class="lines">@@ -69,9 +73,13 @@
</span><span class="cx">     static const AudioObjectPropertyAddress audioDeviceTransportTypeProperty = {
</span><span class="cx">         kAudioDevicePropertyTransportType,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster,
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     UInt32 transportType = kAudioDeviceTransportTypeUnknown;
</span><span class="cx">     UInt32 transportSize = sizeof(transportType);
</span><span class="lines">@@ -117,9 +125,13 @@
</span><span class="cx">     AudioObjectPropertyAddress nominalSampleRateAddress = {
</span><span class="cx">         kAudioDevicePropertyNominalSampleRate,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     AudioObjectAddPropertyListener(defaultDevice(), &nominalSampleRateAddress, handleSampleRateChange, this);
</span><span class="cx"> }
</span><span class="lines">@@ -150,9 +162,13 @@
</span><span class="cx">     AudioObjectPropertyAddress bufferSizeAddress = {
</span><span class="cx">         kAudioDevicePropertyBufferFrameSize,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     AudioObjectAddPropertyListener(defaultDevice(), &bufferSizeAddress, handleBufferSizeChange, this);
</span><span class="cx"> }
</span><span class="lines">@@ -279,9 +295,13 @@
</span><span class="cx">         AudioObjectPropertyAddress nominalSampleRateAddress = {
</span><span class="cx">             kAudioDevicePropertyNominalSampleRate,
</span><span class="cx">             kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         OSStatus result = AudioObjectGetPropertyData(defaultDevice(), &nominalSampleRateAddress, 0, 0, &nominalSampleRateSize, (void*)&nominalSampleRate);
</span><span class="cx">         if (result != noErr) {
</span><span class="lines">@@ -311,9 +331,13 @@
</span><span class="cx">     AudioObjectPropertyAddress bufferSizeAddress = {
</span><span class="cx">         kAudioDevicePropertyBufferFrameSize,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     OSStatus result = AudioObjectGetPropertyData(defaultDevice(), &bufferSizeAddress, 0, 0, &bufferSizeSize, &bufferSize);
</span><span class="cx"> 
</span><span class="lines">@@ -336,9 +360,13 @@
</span><span class="cx">     AudioObjectPropertyAddress sizeAddress = {
</span><span class="cx">         kAudioDevicePropertyStreamConfiguration,
</span><span class="cx">         kAudioObjectPropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     UInt32 size = 0;
</span><span class="lines">@@ -390,9 +418,13 @@
</span><span class="cx">     AudioObjectPropertyAddress bufferSizeRangeAddress = {
</span><span class="cx">         kAudioDevicePropertyBufferFrameSizeRange,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     OSStatus result = AudioObjectGetPropertyData(defaultDevice(), &bufferSizeRangeAddress, 0, 0, &bufferSizeRangeSize, &bufferSizeRange);
</span><span class="cx">     if (result)
</span><span class="lines">@@ -405,9 +437,13 @@
</span><span class="cx">     AudioObjectPropertyAddress preferredBufferSizeAddress = {
</span><span class="cx">         kAudioDevicePropertyBufferFrameSize,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     result = AudioObjectSetPropertyData(defaultDevice(), &preferredBufferSizeAddress, 0, 0, sizeof(bufferSizeOut), (void*)&bufferSizeOut);
</span><span class="lines">@@ -430,9 +466,13 @@
</span><span class="cx">     AudioObjectPropertyAddress muteAddress = {
</span><span class="cx">         kAudioDevicePropertyMute,
</span><span class="cx">         kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     AudioObjectGetPropertyData(defaultDevice(), &muteAddress, 0, nullptr, &muteSize, &mute);
</span><span class="cx">     
</span><span class="lines">@@ -480,9 +520,13 @@
</span><span class="cx">     AudioObjectPropertyAddress muteAddress = {
</span><span class="cx">         kAudioDevicePropertyMute,
</span><span class="cx">         kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     AudioObjectAddPropertyListener(defaultDevice(), &muteAddress, handleMutePropertyChange, this);
</span><span class="cx"> }
</span><span class="lines">@@ -493,9 +537,13 @@
</span><span class="cx">         AudioObjectPropertyAddress muteAddress = {
</span><span class="cx">             kAudioDevicePropertyMute,
</span><span class="cx">             kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         AudioObjectRemovePropertyListener(defaultDevice(), &muteAddress, handleMutePropertyChange, this);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureDevicecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDevice.cpp (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDevice.cpp 2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDevice.cpp    2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -44,9 +44,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address {
</span><span class="cx">         kAudioDevicePropertyDeviceUID,
</span><span class="cx">         kAudioDevicePropertyScopeInput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     UInt32 dataSize = sizeof(uniqueID);
</span><span class="cx">     auto err = AudioObjectGetPropertyData(static_cast<UInt32>(deviceID), &address, 0, nullptr, &dataSize, &uniqueID);
</span><span class="lines">@@ -62,9 +66,13 @@
</span><span class="cx">     address = {
</span><span class="cx">         kAudioDevicePropertyDataSource,
</span><span class="cx">         scope,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     uint32_t sourceID;
</span><span class="cx">     dataSize = sizeof(sourceID);
</span><span class="lines">@@ -74,9 +82,13 @@
</span><span class="cx">         address = {
</span><span class="cx">             kAudioDevicePropertyDataSourceNameForIDCFString,
</span><span class="cx">             scope,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         dataSize = sizeof(translation);
</span><span class="cx">         err = AudioObjectGetPropertyData(static_cast<UInt32>(deviceID), &address, 0, nullptr, &dataSize, &translation);
</span><span class="lines">@@ -86,9 +98,13 @@
</span><span class="cx">         address = {
</span><span class="cx">             kAudioObjectPropertyName,
</span><span class="cx">             kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         dataSize = sizeof(localizedName);
</span><span class="cx">         err = AudioObjectGetPropertyData(static_cast<UInt32>(deviceID), &address, 0, nullptr, &dataSize, &localizedName);
</span><span class="lines">@@ -123,9 +139,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address {
</span><span class="cx">         kAudioDevicePropertyDeviceIsAlive,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     UInt32 state = 0;
</span><span class="cx">     UInt32 dataSize = sizeof(state);
</span><span class="lines">@@ -138,9 +158,13 @@
</span><span class="cx">     address = {
</span><span class="cx">         property,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     AudioDeviceID defaultID = kAudioDeviceUnknown;
</span><span class="cx">     dataSize = sizeof(defaultID);
</span><span class="lines">@@ -156,9 +180,13 @@
</span><span class="cx">     AudioObjectPropertyAddress property = {
</span><span class="cx">         kAudioDevicePropertyRelatedDevices,
</span><span class="cx">         kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     OSStatus error = AudioObjectGetPropertyDataSize(deviceID, &property, 0, 0, &size);
</span><span class="cx">     if (error || !size)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureDeviceManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp  2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp     2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -84,9 +84,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address = {
</span><span class="cx">         kAudioDevicePropertyStreamConfiguration,
</span><span class="cx">         kAudioDevicePropertyScopeInput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     return deviceHasStreams(deviceID, address);
</span><span class="cx"> }
</span><span class="lines">@@ -96,9 +100,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address = {
</span><span class="cx">         kAudioDevicePropertyStreamConfiguration,
</span><span class="cx">         kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     return deviceHasStreams(deviceID, address);
</span><span class="cx"> }
</span><span class="lines">@@ -109,9 +117,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address = {
</span><span class="cx">         kAudioDevicePropertyTapEnabled,
</span><span class="cx">         kAudioDevicePropertyScopeOutput,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     if (AudioObjectHasProperty(device.deviceID(), &address)) {
</span><span class="cx">         RELEASE_LOG(WebRTC, "Ignoring output device that have input only for echo cancellation");
</span><span class="lines">@@ -123,9 +135,13 @@
</span><span class="cx">     address = {
</span><span class="cx">         kAudioObjectPropertyCreator,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     CFStringRef name = nullptr;
</span><span class="cx">     dataSize = sizeof(name);
</span><span class="lines">@@ -186,9 +202,13 @@
</span><span class="cx">         AudioObjectPropertyAddress address = {
</span><span class="cx">             kAudioHardwarePropertyDevices,
</span><span class="cx">             kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         auto err = AudioObjectAddPropertyListenerBlock(kAudioObjectSystemObject, &address, dispatch_get_main_queue(), listener);
</span><span class="cx">         if (err)
</span><span class="lines">@@ -197,9 +217,13 @@
</span><span class="cx">         address = {
</span><span class="cx">             kAudioHardwarePropertyDefaultInputDevice,
</span><span class="cx">             kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         err = AudioObjectAddPropertyListenerBlock(kAudioObjectSystemObject, &address, dispatch_get_main_queue(), listener);
</span><span class="cx">         if (err)
</span><span class="lines">@@ -208,9 +232,13 @@
</span><span class="cx">         address = {
</span><span class="cx">             kAudioHardwarePropertyDefaultOutputDevice,
</span><span class="cx">             kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+            kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">             kAudioObjectPropertyElementMaster
</span><span class="cx">             ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">         };
</span><span class="cx">         err = AudioObjectAddPropertyListenerBlock(kAudioObjectSystemObject, &address, dispatch_get_main_queue(), listener);
</span><span class="cx">         if (err)
</span><span class="lines">@@ -241,9 +269,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address = {
</span><span class="cx">         kAudioHardwarePropertyDevices,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx">     UInt32 dataSize = 0;
</span><span class="cx">     auto err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &address, 0, nullptr, &dataSize);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacCoreAudioCaptureSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (277606 => 277607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp 2021-05-17 21:21:08 UTC (rev 277606)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp    2021-05-17 21:26:59 UTC (rev 277607)
</span><span class="lines">@@ -579,9 +579,13 @@
</span><span class="cx">     AudioObjectPropertyAddress address = {
</span><span class="cx">         kAudioHardwarePropertyDefaultOutputDevice,
</span><span class="cx">         kAudioObjectPropertyScopeGlobal,
</span><ins>+#if HAVE(AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN)
+        kAudioObjectPropertyElementMain
+#else
</ins><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
</span><span class="cx">         kAudioObjectPropertyElementMaster
</span><span class="cx">         ALLOW_DEPRECATED_DECLARATIONS_END
</span><ins>+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (AudioObjectHasProperty(kAudioObjectSystemObject, &address)) {
</span></span></pre>
</div>
</div>

</body>
</html>