Prefix ALSA and PULSE macros with WEBRTC_.
This CL renames the internal macros LINUX_ALSA and LINUX_PULSE and adds
the prefix WEBRTC_. Since these macros are internal to WebRTC, it is
better to use a prefix.
Bug: None
Change-Id: I2a07fa569a4da168006cc36f32e4dbb98a75814b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171514
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30885}
diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn
index e5e23ce..381c71f 100644
--- a/modules/audio_device/BUILD.gn
+++ b/modules/audio_device/BUILD.gn
@@ -270,7 +270,7 @@
"linux/latebindingsymboltable_linux.cc",
"linux/latebindingsymboltable_linux.h",
]
- defines += [ "LINUX_ALSA" ]
+ defines += [ "WEBRTC_ENABLE_LINUX_ALSA" ]
libs = [ "dl" ]
if (rtc_use_x11) {
libs += [ "X11" ]
@@ -285,7 +285,7 @@
"linux/pulseaudiosymboltable_linux.cc",
"linux/pulseaudiosymboltable_linux.h",
]
- defines += [ "LINUX_PULSE" ]
+ defines += [ "WEBRTC_ENABLE_LINUX_PULSE" ]
}
}
if (is_mac) {
diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc
index 95f9f03..73031b9 100644
--- a/modules/audio_device/audio_device_impl.cc
+++ b/modules/audio_device/audio_device_impl.cc
@@ -37,10 +37,10 @@
#include "modules/audio_device/android/opensles_player.h"
#include "modules/audio_device/android/opensles_recorder.h"
#elif defined(WEBRTC_LINUX)
-#if defined(LINUX_ALSA)
+#if defined(WEBRTC_ENABLE_LINUX_ALSA)
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#endif
-#if defined(LINUX_PULSE)
+#if defined(WEBRTC_ENABLE_LINUX_PULSE)
#include "modules/audio_device/linux/audio_device_pulse_linux.h"
#endif
#elif defined(WEBRTC_IOS)
@@ -241,12 +241,13 @@
// END #if defined(WEBRTC_ANDROID)
// Linux ADM implementation.
-// Note that, LINUX_ALSA is always defined by default when WEBRTC_LINUX is
-// defined. LINUX_PULSE depends on the 'rtc_include_pulse_audio' build flag.
+// Note that, WEBRTC_ENABLE_LINUX_ALSA is always defined by default when
+// WEBRTC_LINUX is defined. WEBRTC_ENABLE_LINUX_PULSE depends on the
+// 'rtc_include_pulse_audio' build flag.
// TODO(bugs.webrtc.org/9127): improve support and make it more clear that
// PulseAudio is the default selection.
#elif defined(WEBRTC_LINUX)
-#if !defined(LINUX_PULSE)
+#if !defined(WEBRTC_ENABLE_LINUX_PULSE)
// Build flag 'rtc_include_pulse_audio' is set to false. In this mode:
// - kPlatformDefaultAudio => ALSA, and
// - kLinuxAlsaAudio => ALSA, and
@@ -273,7 +274,7 @@
audio_device_.reset(new AudioDeviceLinuxALSA());
RTC_LOG(WARNING) << "Linux ALSA APIs will be utilized.";
}
-#endif // #if !defined(LINUX_PULSE)
+#endif // #if !defined(WEBRTC_ENABLE_LINUX_PULSE)
#endif // #if defined(WEBRTC_LINUX)
// iOS ADM implementation.