electron/patches/common/chromium/mas-audiodeviceduck.patch

31 lines
967 B
Diff

diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index 53586b888d82..c1d750dbf32d 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -31,19 +31,23 @@
namespace {
extern "C" {
+#ifndef MAS_BUILD
// See:
// https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h?rev=228264
OSStatus AudioDeviceDuck(AudioDeviceID inDevice,
Float32 inDuckedLevel,
const AudioTimeStamp* __nullable inStartTime,
Float32 inRampDuration) __attribute__((weak_import));
+#endif
}
void UndoDucking(AudioDeviceID output_device_id) {
+#ifndef MAS_BUILD
if (AudioDeviceDuck != nullptr) {
// Ramp the volume back up over half a second.
AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
}
+#endif
}
} // namespace
--
2.17.0