2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
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.
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
2019-12-13 20:13:12 +00:00
|
|
|
index 7982674799f68ab331f08291ff72244c2e7356bb..e9db50fb703a5438444f50d064702d93ab731dde 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
|
|
|
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
2019-01-12 01:00:43 +00:00
|
|
|
@@ -33,19 +33,23 @@
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-09-14 18:03:43 +00:00
|
|
|
void UndoDucking(AudioDeviceID output_device_id) {
|
2018-09-14 05:02:16 +00:00
|
|
|
+#ifndef MAS_BUILD
|
|
|
|
if (AudioDeviceDuck != nullptr) {
|
2018-09-14 18:03:43 +00:00
|
|
|
// Ramp the volume back up over half a second.
|
|
|
|
AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
2018-09-14 18:03:43 +00:00
|
|
|
|
|
|
|
} // namespace
|