From fc9770c10242305511e30aead51f6862b2172362 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 24 Mar 2020 12:56:47 +0100 Subject: [PATCH] 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 Reviewed-by: Karl Wiberg Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#30885} --- modules/audio_device/BUILD.gn | 4 ++-- modules/audio_device/audio_device_impl.cc | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn index e5e23ce095..381c71f996 100644 --- a/modules/audio_device/BUILD.gn +++ b/modules/audio_device/BUILD.gn @@ -270,7 +270,7 @@ rtc_library("audio_device_impl") { "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 @@ rtc_library("audio_device_impl") { "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 95f9f03993..73031b9597 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 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { // 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 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { 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.