35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <nornagon@nornagon.net>
|
|
Date: Thu, 20 Sep 2018 17:49:31 -0700
|
|
Subject: mas-audiodeviceduck.patch
|
|
|
|
Removes usage of the AudioDeviceDuck private API.
|
|
|
|
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
|
index eb39b38c308ddd876e3fbc142d4fdfd5dc002cb5..137ccd81aa98f6d44969e7b7733e2cfb1fb615a9 100644
|
|
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
|
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
|
@@ -34,19 +34,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
|