Remove usage of INFO alias for LS_INFO in log messages

Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
This commit is contained in:
Harald Alvestrand
2021-11-04 12:01:23 +00:00
committed by WebRTC LUCI CQ
parent bd9106d88f
commit 97597c0f51
70 changed files with 1140 additions and 1125 deletions

View File

@ -73,7 +73,7 @@ namespace webrtc {
rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory) {
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return AudioDeviceModule::CreateForTest(audio_layer, task_queue_factory);
}
@ -81,7 +81,7 @@ rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create(
rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory) {
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
// The "AudioDeviceModule::kWindowsCoreAudio2" audio layer has its own
// dedicated factory method which should be used instead.
@ -118,28 +118,28 @@ AudioDeviceModuleImpl::AudioDeviceModuleImpl(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory)
: audio_layer_(audio_layer), audio_device_buffer_(task_queue_factory) {
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
}
int32_t AudioDeviceModuleImpl::CheckPlatform() {
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
// Ensure that the current platform is supported
PlatformType platform(kPlatformNotSupported);
#if defined(_WIN32)
platform = kPlatformWin32;
RTC_LOG(INFO) << "current platform is Win32";
RTC_LOG(LS_INFO) << "current platform is Win32";
#elif defined(WEBRTC_ANDROID)
platform = kPlatformAndroid;
RTC_LOG(INFO) << "current platform is Android";
RTC_LOG(LS_INFO) << "current platform is Android";
#elif defined(WEBRTC_LINUX)
platform = kPlatformLinux;
RTC_LOG(INFO) << "current platform is Linux";
RTC_LOG(LS_INFO) << "current platform is Linux";
#elif defined(WEBRTC_IOS)
platform = kPlatformIOS;
RTC_LOG(INFO) << "current platform is IOS";
RTC_LOG(LS_INFO) << "current platform is IOS";
#elif defined(WEBRTC_MAC)
platform = kPlatformMac;
RTC_LOG(INFO) << "current platform is Mac";
RTC_LOG(LS_INFO) << "current platform is Mac";
#endif
if (platform == kPlatformNotSupported) {
RTC_LOG(LERROR)
@ -152,19 +152,19 @@ int32_t AudioDeviceModuleImpl::CheckPlatform() {
}
int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
// Dummy ADM implementations if build flags are set.
#if defined(WEBRTC_DUMMY_AUDIO_BUILD)
audio_device_.reset(new AudioDeviceDummy());
RTC_LOG(INFO) << "Dummy Audio APIs will be utilized";
RTC_LOG(LS_INFO) << "Dummy Audio APIs will be utilized";
#elif defined(WEBRTC_DUMMY_FILE_DEVICES)
audio_device_.reset(FileAudioDeviceFactory::CreateFileAudioDevice());
if (audio_device_) {
RTC_LOG(INFO) << "Will use file-playing dummy device.";
RTC_LOG(LS_INFO) << "Will use file-playing dummy device.";
} else {
// Create a dummy device instead.
audio_device_.reset(new AudioDeviceDummy());
RTC_LOG(INFO) << "Dummy Audio APIs will be utilized";
RTC_LOG(LS_INFO) << "Dummy Audio APIs will be utilized";
}
// Real (non-dummy) ADM implementations.
@ -174,10 +174,10 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
#if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD)
if ((audio_layer == kWindowsCoreAudio) ||
(audio_layer == kPlatformDefaultAudio)) {
RTC_LOG(INFO) << "Attempting to use the Windows Core Audio APIs...";
RTC_LOG(LS_INFO) << "Attempting to use the Windows Core Audio APIs...";
if (AudioDeviceWindowsCore::CoreAudioIsSupported()) {
audio_device_.reset(new AudioDeviceWindowsCore());
RTC_LOG(INFO) << "Windows Core Audio APIs will be utilized";
RTC_LOG(LS_INFO) << "Windows Core Audio APIs will be utilized";
}
}
#endif // defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD)
@ -255,7 +255,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
if ((audio_layer == kLinuxAlsaAudio) ||
(audio_layer == kPlatformDefaultAudio)) {
audio_device_.reset(new AudioDeviceLinuxALSA());
RTC_LOG(INFO) << "Linux ALSA APIs will be utilized.";
RTC_LOG(LS_INFO) << "Linux ALSA APIs will be utilized.";
}
#else
// Build flag 'rtc_include_pulse_audio' is set to true (default). In this
@ -263,12 +263,12 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
// - kPlatformDefaultAudio => PulseAudio, and
// - kLinuxPulseAudio => PulseAudio, and
// - kLinuxAlsaAudio => ALSA (supported but not default).
RTC_LOG(INFO) << "PulseAudio support is enabled.";
RTC_LOG(LS_INFO) << "PulseAudio support is enabled.";
if ((audio_layer == kLinuxPulseAudio) ||
(audio_layer == kPlatformDefaultAudio)) {
// Linux PulseAudio implementation is default.
audio_device_.reset(new AudioDeviceLinuxPulse());
RTC_LOG(INFO) << "Linux PulseAudio APIs will be utilized";
RTC_LOG(LS_INFO) << "Linux PulseAudio APIs will be utilized";
} else if (audio_layer == kLinuxAlsaAudio) {
audio_device_.reset(new AudioDeviceLinuxALSA());
RTC_LOG(WARNING) << "Linux ALSA APIs will be utilized.";
@ -281,7 +281,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
if (audio_layer == kPlatformDefaultAudio) {
audio_device_.reset(
new ios_adm::AudioDeviceIOS(/*bypass_voice_processing=*/false));
RTC_LOG(INFO) << "iPhone Audio APIs will be utilized.";
RTC_LOG(LS_INFO) << "iPhone Audio APIs will be utilized.";
}
// END #if defined(WEBRTC_IOS)
@ -289,14 +289,14 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
#elif defined(WEBRTC_MAC)
if (audio_layer == kPlatformDefaultAudio) {
audio_device_.reset(new AudioDeviceMac());
RTC_LOG(INFO) << "Mac OS X Audio APIs will be utilized.";
RTC_LOG(LS_INFO) << "Mac OS X Audio APIs will be utilized.";
}
#endif // WEBRTC_MAC
// Dummy ADM implementation.
if (audio_layer == kDummyAudio) {
audio_device_.reset(new AudioDeviceDummy());
RTC_LOG(INFO) << "Dummy Audio APIs will be utilized.";
RTC_LOG(LS_INFO) << "Dummy Audio APIs will be utilized.";
}
#endif // if defined(WEBRTC_DUMMY_AUDIO_BUILD)
@ -309,17 +309,17 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
}
int32_t AudioDeviceModuleImpl::AttachAudioBuffer() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
audio_device_->AttachAudioBuffer(&audio_device_buffer_);
return 0;
}
AudioDeviceModuleImpl::~AudioDeviceModuleImpl() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
}
int32_t AudioDeviceModuleImpl::ActiveAudioLayer(AudioLayer* audioLayer) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
AudioLayer activeAudio;
if (audio_device_->ActiveAudioLayer(activeAudio) == -1) {
return -1;
@ -329,7 +329,7 @@ int32_t AudioDeviceModuleImpl::ActiveAudioLayer(AudioLayer* audioLayer) const {
}
int32_t AudioDeviceModuleImpl::Init() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
if (initialized_)
return 0;
RTC_CHECK(audio_device_);
@ -346,7 +346,7 @@ int32_t AudioDeviceModuleImpl::Init() {
}
int32_t AudioDeviceModuleImpl::Terminate() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
if (!initialized_)
return 0;
if (audio_device_->Terminate() == -1) {
@ -357,65 +357,65 @@ int32_t AudioDeviceModuleImpl::Terminate() {
}
bool AudioDeviceModuleImpl::Initialized() const {
RTC_LOG(INFO) << __FUNCTION__ << ": " << initialized_;
RTC_LOG(LS_INFO) << __FUNCTION__ << ": " << initialized_;
return initialized_;
}
int32_t AudioDeviceModuleImpl::InitSpeaker() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->InitSpeaker();
}
int32_t AudioDeviceModuleImpl::InitMicrophone() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->InitMicrophone();
}
int32_t AudioDeviceModuleImpl::SpeakerVolumeIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->SpeakerVolumeIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetSpeakerVolume(uint32_t volume) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << volume << ")";
CHECKinitialized_();
return audio_device_->SetSpeakerVolume(volume);
}
int32_t AudioDeviceModuleImpl::SpeakerVolume(uint32_t* volume) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
uint32_t level = 0;
if (audio_device_->SpeakerVolume(level) == -1) {
return -1;
}
*volume = level;
RTC_LOG(INFO) << "output: " << *volume;
RTC_LOG(LS_INFO) << "output: " << *volume;
return 0;
}
bool AudioDeviceModuleImpl::SpeakerIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isInitialized = audio_device_->SpeakerIsInitialized();
RTC_LOG(INFO) << "output: " << isInitialized;
RTC_LOG(LS_INFO) << "output: " << isInitialized;
return isInitialized;
}
bool AudioDeviceModuleImpl::MicrophoneIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isInitialized = audio_device_->MicrophoneIsInitialized();
RTC_LOG(INFO) << "output: " << isInitialized;
RTC_LOG(LS_INFO) << "output: " << isInitialized;
return isInitialized;
}
@ -440,110 +440,110 @@ int32_t AudioDeviceModuleImpl::MinSpeakerVolume(uint32_t* minVolume) const {
}
int32_t AudioDeviceModuleImpl::SpeakerMuteIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->SpeakerMuteIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetSpeakerMute(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
return audio_device_->SetSpeakerMute(enable);
}
int32_t AudioDeviceModuleImpl::SpeakerMute(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool muted = false;
if (audio_device_->SpeakerMute(muted) == -1) {
return -1;
}
*enabled = muted;
RTC_LOG(INFO) << "output: " << muted;
RTC_LOG(LS_INFO) << "output: " << muted;
return 0;
}
int32_t AudioDeviceModuleImpl::MicrophoneMuteIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->MicrophoneMuteIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetMicrophoneMute(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
return (audio_device_->SetMicrophoneMute(enable));
}
int32_t AudioDeviceModuleImpl::MicrophoneMute(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool muted = false;
if (audio_device_->MicrophoneMute(muted) == -1) {
return -1;
}
*enabled = muted;
RTC_LOG(INFO) << "output: " << muted;
RTC_LOG(LS_INFO) << "output: " << muted;
return 0;
}
int32_t AudioDeviceModuleImpl::MicrophoneVolumeIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->MicrophoneVolumeIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetMicrophoneVolume(uint32_t volume) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << volume << ")";
CHECKinitialized_();
return (audio_device_->SetMicrophoneVolume(volume));
}
int32_t AudioDeviceModuleImpl::MicrophoneVolume(uint32_t* volume) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
uint32_t level = 0;
if (audio_device_->MicrophoneVolume(level) == -1) {
return -1;
}
*volume = level;
RTC_LOG(INFO) << "output: " << *volume;
RTC_LOG(LS_INFO) << "output: " << *volume;
return 0;
}
int32_t AudioDeviceModuleImpl::StereoRecordingIsAvailable(
bool* available) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->StereoRecordingIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetStereoRecording(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
if (audio_device_->RecordingIsInitialized()) {
RTC_LOG(LERROR)
@ -565,31 +565,31 @@ int32_t AudioDeviceModuleImpl::SetStereoRecording(bool enable) {
}
int32_t AudioDeviceModuleImpl::StereoRecording(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool stereo = false;
if (audio_device_->StereoRecording(stereo) == -1) {
return -1;
}
*enabled = stereo;
RTC_LOG(INFO) << "output: " << stereo;
RTC_LOG(LS_INFO) << "output: " << stereo;
return 0;
}
int32_t AudioDeviceModuleImpl::StereoPlayoutIsAvailable(bool* available) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->StereoPlayoutIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::SetStereoPlayout(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
if (audio_device_->PlayoutIsInitialized()) {
RTC_LOG(LERROR)
@ -609,38 +609,38 @@ int32_t AudioDeviceModuleImpl::SetStereoPlayout(bool enable) {
}
int32_t AudioDeviceModuleImpl::StereoPlayout(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool stereo = false;
if (audio_device_->StereoPlayout(stereo) == -1) {
return -1;
}
*enabled = stereo;
RTC_LOG(INFO) << "output: " << stereo;
RTC_LOG(LS_INFO) << "output: " << stereo;
return 0;
}
int32_t AudioDeviceModuleImpl::PlayoutIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->PlayoutIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleImpl::RecordingIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->RecordingIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return 0;
}
@ -665,21 +665,21 @@ int32_t AudioDeviceModuleImpl::MinMicrophoneVolume(uint32_t* minVolume) const {
}
int16_t AudioDeviceModuleImpl::PlayoutDevices() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
uint16_t nPlayoutDevices = audio_device_->PlayoutDevices();
RTC_LOG(INFO) << "output: " << nPlayoutDevices;
RTC_LOG(LS_INFO) << "output: " << nPlayoutDevices;
return (int16_t)(nPlayoutDevices);
}
int32_t AudioDeviceModuleImpl::SetPlayoutDevice(uint16_t index) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << index << ")";
CHECKinitialized_();
return audio_device_->SetPlayoutDevice(index);
}
int32_t AudioDeviceModuleImpl::SetPlayoutDevice(WindowsDeviceType device) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->SetPlayoutDevice(device);
}
@ -688,7 +688,7 @@ int32_t AudioDeviceModuleImpl::PlayoutDeviceName(
uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << index << ", ...)";
CHECKinitialized_();
if (name == NULL) {
return -1;
@ -697,10 +697,10 @@ int32_t AudioDeviceModuleImpl::PlayoutDeviceName(
return -1;
}
if (name != NULL) {
RTC_LOG(INFO) << "output: name = " << name;
RTC_LOG(LS_INFO) << "output: name = " << name;
}
if (guid != NULL) {
RTC_LOG(INFO) << "output: guid = " << guid;
RTC_LOG(LS_INFO) << "output: guid = " << guid;
}
return 0;
}
@ -709,7 +709,7 @@ int32_t AudioDeviceModuleImpl::RecordingDeviceName(
uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << index << ", ...)";
CHECKinitialized_();
if (name == NULL) {
return -1;
@ -718,137 +718,137 @@ int32_t AudioDeviceModuleImpl::RecordingDeviceName(
return -1;
}
if (name != NULL) {
RTC_LOG(INFO) << "output: name = " << name;
RTC_LOG(LS_INFO) << "output: name = " << name;
}
if (guid != NULL) {
RTC_LOG(INFO) << "output: guid = " << guid;
RTC_LOG(LS_INFO) << "output: guid = " << guid;
}
return 0;
}
int16_t AudioDeviceModuleImpl::RecordingDevices() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
uint16_t nRecordingDevices = audio_device_->RecordingDevices();
RTC_LOG(INFO) << "output: " << nRecordingDevices;
RTC_LOG(LS_INFO) << "output: " << nRecordingDevices;
return (int16_t)nRecordingDevices;
}
int32_t AudioDeviceModuleImpl::SetRecordingDevice(uint16_t index) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << index << ")";
CHECKinitialized_();
return audio_device_->SetRecordingDevice(index);
}
int32_t AudioDeviceModuleImpl::SetRecordingDevice(WindowsDeviceType device) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->SetRecordingDevice(device);
}
int32_t AudioDeviceModuleImpl::InitPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
if (PlayoutIsInitialized()) {
return 0;
}
int32_t result = audio_device_->InitPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleImpl::InitRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
if (RecordingIsInitialized()) {
return 0;
}
int32_t result = audio_device_->InitRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleImpl::PlayoutIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->PlayoutIsInitialized();
}
bool AudioDeviceModuleImpl::RecordingIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->RecordingIsInitialized();
}
int32_t AudioDeviceModuleImpl::StartPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
if (Playing()) {
return 0;
}
audio_device_buffer_.StartPlayout();
int32_t result = audio_device_->StartPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleImpl::StopPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
int32_t result = audio_device_->StopPlayout();
audio_device_buffer_.StopPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleImpl::Playing() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->Playing();
}
int32_t AudioDeviceModuleImpl::StartRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
if (Recording()) {
return 0;
}
audio_device_buffer_.StartRecording();
int32_t result = audio_device_->StartRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleImpl::StopRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
int32_t result = audio_device_->StopRecording();
audio_device_buffer_.StopRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_LOG(LS_INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleImpl::Recording() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->Recording();
}
int32_t AudioDeviceModuleImpl::RegisterAudioCallback(
AudioTransport* audioCallback) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
return audio_device_buffer_.RegisterAudioCallback(audioCallback);
}
@ -864,87 +864,87 @@ int32_t AudioDeviceModuleImpl::PlayoutDelay(uint16_t* delayMS) const {
}
bool AudioDeviceModuleImpl::BuiltInAECIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInAECIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleImpl::EnableBuiltInAEC(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInAEC(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_LOG(LS_INFO) << "output: " << ok;
return ok;
}
bool AudioDeviceModuleImpl::BuiltInAGCIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInAGCIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleImpl::EnableBuiltInAGC(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInAGC(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_LOG(LS_INFO) << "output: " << ok;
return ok;
}
bool AudioDeviceModuleImpl::BuiltInNSIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInNSIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_LOG(LS_INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleImpl::EnableBuiltInNS(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_LOG(LS_INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInNS(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_LOG(LS_INFO) << "output: " << ok;
return ok;
}
int32_t AudioDeviceModuleImpl::GetPlayoutUnderrunCount() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
CHECKinitialized_();
int32_t underrunCount = audio_device_->GetPlayoutUnderrunCount();
RTC_LOG(INFO) << "output: " << underrunCount;
RTC_LOG(LS_INFO) << "output: " << underrunCount;
return underrunCount;
}
#if defined(WEBRTC_IOS)
int AudioDeviceModuleImpl::GetPlayoutAudioParameters(
AudioParameters* params) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
int r = audio_device_->GetPlayoutAudioParameters(params);
RTC_LOG(INFO) << "output: " << r;
RTC_LOG(LS_INFO) << "output: " << r;
return r;
}
int AudioDeviceModuleImpl::GetRecordAudioParameters(
AudioParameters* params) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
int r = audio_device_->GetRecordAudioParameters(params);
RTC_LOG(INFO) << "output: " << r;
RTC_LOG(LS_INFO) << "output: " << r;
return r;
}
#endif // WEBRTC_IOS
AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
return platform_type_;
}
AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer()
const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(LS_INFO) << __FUNCTION__;
return audio_layer_;
}