Move some RTC_LOG to RTC_DLOG.

Some locations in the WebRTC codebase RTC_LOG the value of the
__FUNCTION__ macro which probably is useful in debug mode. Moving
these instances to RTC_DLOG saves ~10 KiB on arm64.

Bug: webrtc:11986
Change-Id: I5d81cc459d2850657a712b9aed80c187edf49a3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203981
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33086}
This commit is contained in:
Mirko Bonadei
2021-01-28 09:21:06 +01:00
committed by Commit Bot
parent 70f9e249d5
commit 3b68aa346a
18 changed files with 313 additions and 317 deletions

View File

@ -39,7 +39,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
output_(audio_manager_),
input_(audio_manager_),
initialized_(false) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK(audio_manager);
audio_manager_->SetActiveAudioLayer(audio_layer);
}
@ -48,13 +48,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
int32_t ActiveAudioLayer(
AudioDeviceModule::AudioLayer& audioLayer) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
audioLayer = audio_layer_;
return 0;
}
InitStatus Init() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_DCHECK(!initialized_);
if (!audio_manager_->Init()) {
@ -74,7 +74,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
int32_t Terminate() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK(thread_checker_.IsCurrent());
int32_t err = input_.Terminate();
err |= output_.Terminate();
@ -85,18 +85,18 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
bool Initialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK(thread_checker_.IsCurrent());
return initialized_;
}
int16_t PlayoutDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 1;
}
int16_t RecordingDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 1;
}
@ -115,7 +115,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
int32_t SetPlayoutDevice(uint16_t index) override {
// OK to use but it has no effect currently since device selection is
// done using Andoid APIs instead.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 0;
}
@ -127,7 +127,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
int32_t SetRecordingDevice(uint16_t index) override {
// OK to use but it has no effect currently since device selection is
// done using Andoid APIs instead.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 0;
}
@ -137,39 +137,39 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
int32_t PlayoutIsAvailable(bool& available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
available = true;
return 0;
}
int32_t InitPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.InitPlayout();
}
bool PlayoutIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.PlayoutIsInitialized();
}
int32_t RecordingIsAvailable(bool& available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
available = true;
return 0;
}
int32_t InitRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return input_.InitRecording();
}
bool RecordingIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return input_.RecordingIsInitialized();
}
int32_t StartPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!audio_manager_->IsCommunicationModeEnabled()) {
RTC_LOG(WARNING)
<< "The application should use MODE_IN_COMMUNICATION audio mode!";
@ -181,7 +181,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
// Avoid using audio manger (JNI/Java cost) if playout was inactive.
if (!Playing())
return 0;
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
int32_t err = output_.StopPlayout();
return err;
}
@ -192,7 +192,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
int32_t StartRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!audio_manager_->IsCommunicationModeEnabled()) {
RTC_LOG(WARNING)
<< "The application should use MODE_IN_COMMUNICATION audio mode!";
@ -202,7 +202,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
int32_t StopRecording() override {
// Avoid using audio manger (JNI/Java cost) if recording was inactive.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!Recording())
return 0;
int32_t err = input_.StopRecording();
@ -212,47 +212,47 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
bool Recording() const override { return input_.Recording(); }
int32_t InitSpeaker() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 0;
}
bool SpeakerIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return true;
}
int32_t InitMicrophone() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return 0;
}
bool MicrophoneIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return true;
}
int32_t SpeakerVolumeIsAvailable(bool& available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.SpeakerVolumeIsAvailable(available);
}
int32_t SetSpeakerVolume(uint32_t volume) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.SetSpeakerVolume(volume);
}
int32_t SpeakerVolume(uint32_t& volume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.SpeakerVolume(volume);
}
int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.MaxSpeakerVolume(maxVolume);
}
int32_t MinSpeakerVolume(uint32_t& minVolume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_.MinSpeakerVolume(minVolume);
}
@ -299,13 +299,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
// Returns true if the audio manager has been configured to support stereo
// and false otherwised. Default is mono.
int32_t StereoPlayoutIsAvailable(bool& available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
available = audio_manager_->IsStereoPlayoutSupported();
return 0;
}
int32_t SetStereoPlayout(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
bool available = audio_manager_->IsStereoPlayoutSupported();
// Android does not support changes between mono and stero on the fly.
// Instead, the native audio layer is configured via the audio manager
@ -320,13 +320,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
int32_t StereoRecordingIsAvailable(bool& available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
available = audio_manager_->IsStereoRecordSupported();
return 0;
}
int32_t SetStereoRecording(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
bool available = audio_manager_->IsStereoRecordSupported();
// Android does not support changes between mono and stero on the fly.
// Instead, the native audio layer is configured via the audio manager
@ -336,7 +336,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
int32_t StereoRecording(bool& enabled) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
enabled = audio_manager_->IsStereoRecordSupported();
return 0;
}
@ -349,7 +349,7 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
}
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
output_.AttachAudioBuffer(audioBuffer);
input_.AttachAudioBuffer(audioBuffer);
}
@ -367,13 +367,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
// a "Not Implemented" log will be filed. This non-perfect state will remain
// until I have added full support for audio effects based on OpenSL ES APIs.
bool BuiltInAECIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return audio_manager_->IsAcousticEchoCancelerSupported();
}
// TODO(henrika): add implementation for OpenSL ES based audio as well.
int32_t EnableBuiltInAEC(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK(BuiltInAECIsAvailable()) << "HW AEC is not available";
return input_.EnableBuiltInAEC(enable);
}
@ -383,13 +383,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
// TODO(henrika): add implementation for OpenSL ES based audio as well.
// In addition, see comments for BuiltInAECIsAvailable().
bool BuiltInAGCIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return audio_manager_->IsAutomaticGainControlSupported();
}
// TODO(henrika): add implementation for OpenSL ES based audio as well.
int32_t EnableBuiltInAGC(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK(BuiltInAGCIsAvailable()) << "HW AGC is not available";
return input_.EnableBuiltInAGC(enable);
}
@ -399,13 +399,13 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
// TODO(henrika): add implementation for OpenSL ES based audio as well.
// In addition, see comments for BuiltInAECIsAvailable().
bool BuiltInNSIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return audio_manager_->IsNoiseSuppressorSupported();
}
// TODO(henrika): add implementation for OpenSL ES based audio as well.
int32_t EnableBuiltInNS(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available";
return input_.EnableBuiltInNS(enable);
}

View File

@ -78,7 +78,7 @@ AudioDeviceBuffer::~AudioDeviceBuffer() {
int32_t AudioDeviceBuffer::RegisterAudioCallback(
AudioTransport* audio_callback) {
RTC_DCHECK_RUN_ON(&main_thread_checker_);
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (playing_ || recording_) {
RTC_LOG(LS_ERROR) << "Failed to set audio transport since media was active";
return -1;
@ -95,7 +95,7 @@ void AudioDeviceBuffer::StartPlayout() {
if (playing_) {
return;
}
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Clear members tracking playout stats and do it on the task queue.
task_queue_.PostTask([this] { ResetPlayStats(); });
// Start a periodic timer based on task queue if not already done by the
@ -114,7 +114,7 @@ void AudioDeviceBuffer::StartRecording() {
if (recording_) {
return;
}
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Clear members tracking recording stats and do it on the task queue.
task_queue_.PostTask([this] { ResetRecStats(); });
// Start a periodic timer based on task queue if not already done by the
@ -136,7 +136,7 @@ void AudioDeviceBuffer::StopPlayout() {
if (!playing_) {
return;
}
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
playing_ = false;
// Stop periodic logging if no more media is active.
if (!recording_) {
@ -150,7 +150,7 @@ void AudioDeviceBuffer::StopRecording() {
if (!recording_) {
return;
}
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
recording_ = false;
// Stop periodic logging if no more media is active.
if (!playing_) {

View File

@ -73,7 +73,7 @@ namespace webrtc {
rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(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_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// The "AudioDeviceModule::kWindowsCoreAudio2" audio layer has its own
// dedicated factory method which should be used instead.
@ -119,11 +119,11 @@ AudioDeviceModuleImpl::AudioDeviceModuleImpl(
AudioLayer audio_layer,
TaskQueueFactory* task_queue_factory)
: audio_layer_(audio_layer), audio_device_buffer_(task_queue_factory) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
}
int32_t AudioDeviceModuleImpl::CheckPlatform() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Ensure that the current platform is supported
PlatformType platform(kPlatformNotSupported);
#if defined(_WIN32)

View File

@ -98,7 +98,7 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA()
_recordingDelay(0),
_playoutDelay(0) {
memset(_oldKeyState, 0, sizeof(_oldKeyState));
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
}
// ----------------------------------------------------------------------------
@ -106,7 +106,7 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA()
// ----------------------------------------------------------------------------
AudioDeviceLinuxALSA::~AudioDeviceLinuxALSA() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
Terminate();

View File

@ -78,7 +78,7 @@ AudioDeviceLinuxPulse::AudioDeviceLinuxPulse()
_playStream(NULL),
_recStreamFlags(0),
_playStreamFlags(0) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
memset(_paServerVersion, 0, sizeof(_paServerVersion));
memset(&_playBufferAttr, 0, sizeof(_playBufferAttr));
@ -87,7 +87,7 @@ AudioDeviceLinuxPulse::AudioDeviceLinuxPulse()
}
AudioDeviceLinuxPulse::~AudioDeviceLinuxPulse() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DCHECK(thread_checker_.IsCurrent());
Terminate();

View File

@ -27,14 +27,14 @@ AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA()
_inputMixerHandle(NULL),
_outputMixerElement(NULL),
_inputMixerElement(NULL) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
memset(_outputMixerStr, 0, kAdmMaxDeviceNameSize);
memset(_inputMixerStr, 0, kAdmMaxDeviceNameSize);
}
AudioMixerManagerLinuxALSA::~AudioMixerManagerLinuxALSA() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
Close();
}
@ -43,7 +43,7 @@ AudioMixerManagerLinuxALSA::~AudioMixerManagerLinuxALSA() {
// ============================================================================
int32_t AudioMixerManagerLinuxALSA::Close() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
MutexLock lock(&mutex_);
@ -59,7 +59,7 @@ int32_t AudioMixerManagerLinuxALSA::CloseSpeaker() {
}
int32_t AudioMixerManagerLinuxALSA::CloseSpeakerLocked() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
int errVal = 0;
@ -94,7 +94,7 @@ int32_t AudioMixerManagerLinuxALSA::CloseMicrophone() {
}
int32_t AudioMixerManagerLinuxALSA::CloseMicrophoneLocked() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
int errVal = 0;
@ -289,13 +289,13 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char* deviceName) {
}
bool AudioMixerManagerLinuxALSA::SpeakerIsInitialized() const {
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_outputMixerHandle != NULL);
}
bool AudioMixerManagerLinuxALSA::MicrophoneIsInitialized() const {
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_inputMixerHandle != NULL);
}

View File

@ -54,12 +54,12 @@ AudioMixerManagerLinuxPulse::AudioMixerManagerLinuxPulse()
_paSpeakerVolume(PA_VOLUME_NORM),
_paChannels(0),
_paObjectsSet(false) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
}
AudioMixerManagerLinuxPulse::~AudioMixerManagerLinuxPulse() {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
Close();
}
@ -72,7 +72,7 @@ int32_t AudioMixerManagerLinuxPulse::SetPulseAudioObjects(
pa_threaded_mainloop* mainloop,
pa_context* context) {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
if (!mainloop || !context) {
RTC_LOG(LS_ERROR) << "could not set PulseAudio objects for mixer";
@ -90,7 +90,7 @@ int32_t AudioMixerManagerLinuxPulse::SetPulseAudioObjects(
int32_t AudioMixerManagerLinuxPulse::Close() {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
CloseSpeaker();
CloseMicrophone();
@ -104,7 +104,7 @@ int32_t AudioMixerManagerLinuxPulse::Close() {
int32_t AudioMixerManagerLinuxPulse::CloseSpeaker() {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
// Reset the index to -1
_paOutputDeviceIndex = -1;
@ -115,7 +115,7 @@ int32_t AudioMixerManagerLinuxPulse::CloseSpeaker() {
int32_t AudioMixerManagerLinuxPulse::CloseMicrophone() {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
// Reset the index to -1
_paInputDeviceIndex = -1;
@ -186,14 +186,14 @@ int32_t AudioMixerManagerLinuxPulse::OpenMicrophone(uint16_t deviceIndex) {
bool AudioMixerManagerLinuxPulse::SpeakerIsInitialized() const {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_paOutputDeviceIndex != -1);
}
bool AudioMixerManagerLinuxPulse::MicrophoneIsInitialized() const {
RTC_DCHECK(thread_checker_.IsCurrent());
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_paInputDeviceIndex != -1);
}

View File

@ -150,7 +150,7 @@ AudioDeviceMac::AudioDeviceMac()
_captureBufSizeSamples(0),
_renderBufSizeSamples(0),
prev_key_state_() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
memset(_renderConvertData, 0, sizeof(_renderConvertData));
memset(&_outStreamFormat, 0, sizeof(AudioStreamBasicDescription));
@ -160,7 +160,7 @@ AudioDeviceMac::AudioDeviceMac()
}
AudioDeviceMac::~AudioDeviceMac() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
if (!_isShutDown) {
Terminate();

View File

@ -46,11 +46,11 @@ AudioMixerManagerMac::AudioMixerManagerMac()
_outputDeviceID(kAudioObjectUnknown),
_noInputChannels(0),
_noOutputChannels(0) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
}
AudioMixerManagerMac::~AudioMixerManagerMac() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
Close();
}
@ -59,7 +59,7 @@ AudioMixerManagerMac::~AudioMixerManagerMac() {
// ============================================================================
int32_t AudioMixerManagerMac::Close() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
MutexLock lock(&mutex_);
@ -75,7 +75,7 @@ int32_t AudioMixerManagerMac::CloseSpeaker() {
}
int32_t AudioMixerManagerMac::CloseSpeakerLocked() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
_outputDeviceID = kAudioObjectUnknown;
_noOutputChannels = 0;
@ -89,7 +89,7 @@ int32_t AudioMixerManagerMac::CloseMicrophone() {
}
int32_t AudioMixerManagerMac::CloseMicrophoneLocked() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
_inputDeviceID = kAudioObjectUnknown;
_noInputChannels = 0;
@ -196,13 +196,13 @@ int32_t AudioMixerManagerMac::OpenMicrophone(AudioDeviceID deviceID) {
}
bool AudioMixerManagerMac::SpeakerIsInitialized() const {
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_outputDeviceID != kAudioObjectUnknown);
}
bool AudioMixerManagerMac::MicrophoneIsInitialized() const {
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
return (_inputDeviceID != kAudioObjectUnknown);
}

View File

@ -174,7 +174,7 @@ class MediaBufferImpl final : public IMediaBuffer {
// ----------------------------------------------------------------------------
bool AudioDeviceWindowsCore::CoreAudioIsSupported() {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
bool MMDeviceIsAvailable(false);
bool coreAudioIsSupported(false);
@ -395,7 +395,7 @@ AudioDeviceWindowsCore::AudioDeviceWindowsCore()
_outputDevice(AudioDeviceModule::kDefaultCommunicationDevice),
_inputDeviceIndex(0),
_outputDeviceIndex(0) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " created";
RTC_DCHECK(_comInit.Succeeded());
// Try to load the Avrt DLL
@ -492,7 +492,7 @@ AudioDeviceWindowsCore::AudioDeviceWindowsCore()
// ----------------------------------------------------------------------------
AudioDeviceWindowsCore::~AudioDeviceWindowsCore() {
RTC_LOG(LS_INFO) << __FUNCTION__ << " destroyed";
RTC_DLOG(LS_INFO) << __FUNCTION__ << " destroyed";
Terminate();
@ -1347,7 +1347,7 @@ Exit:
// ----------------------------------------------------------------------------
int32_t AudioDeviceWindowsCore::MaxMicrophoneVolume(uint32_t& maxVolume) const {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
if (!_microphoneIsInitialized) {
return -1;
@ -3512,7 +3512,7 @@ int AudioDeviceWindowsCore::SetVtI4Property(IPropertyStore* ptrPS,
// ----------------------------------------------------------------------------
int32_t AudioDeviceWindowsCore::_RefreshDeviceList(EDataFlow dir) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
IMMDeviceCollection* pCollection = NULL;
@ -3548,7 +3548,7 @@ int32_t AudioDeviceWindowsCore::_RefreshDeviceList(EDataFlow dir) {
// ----------------------------------------------------------------------------
int16_t AudioDeviceWindowsCore::_DeviceListCount(EDataFlow dir) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
UINT count = 0;
@ -3584,7 +3584,7 @@ int32_t AudioDeviceWindowsCore::_GetListDeviceName(EDataFlow dir,
int index,
LPWSTR szBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
IMMDevice* pDevice = NULL;
@ -3621,7 +3621,7 @@ int32_t AudioDeviceWindowsCore::_GetDefaultDeviceName(EDataFlow dir,
ERole role,
LPWSTR szBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
IMMDevice* pDevice = NULL;
@ -3658,7 +3658,7 @@ int32_t AudioDeviceWindowsCore::_GetListDeviceID(EDataFlow dir,
int index,
LPWSTR szBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
IMMDevice* pDevice = NULL;
@ -3695,7 +3695,7 @@ int32_t AudioDeviceWindowsCore::_GetDefaultDeviceID(EDataFlow dir,
ERole role,
LPWSTR szBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
IMMDevice* pDevice = NULL;
@ -3720,7 +3720,7 @@ int32_t AudioDeviceWindowsCore::_GetDefaultDeviceID(EDataFlow dir,
int32_t AudioDeviceWindowsCore::_GetDefaultDeviceIndex(EDataFlow dir,
ERole role,
int* index) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr = S_OK;
WCHAR szDefaultDeviceID[MAX_PATH] = {0};
@ -3793,7 +3793,7 @@ int32_t AudioDeviceWindowsCore::_GetDefaultDeviceIndex(EDataFlow dir,
int32_t AudioDeviceWindowsCore::_GetDeviceName(IMMDevice* pDevice,
LPWSTR pszBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
static const WCHAR szDefault[] = L"<Device not available>";
@ -3860,7 +3860,7 @@ int32_t AudioDeviceWindowsCore::_GetDeviceName(IMMDevice* pDevice,
int32_t AudioDeviceWindowsCore::_GetDeviceID(IMMDevice* pDevice,
LPWSTR pszBuffer,
int bufferLen) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
static const WCHAR szDefault[] = L"<Device not available>";
@ -3893,7 +3893,7 @@ int32_t AudioDeviceWindowsCore::_GetDeviceID(IMMDevice* pDevice,
int32_t AudioDeviceWindowsCore::_GetDefaultDevice(EDataFlow dir,
ERole role,
IMMDevice** ppDevice) {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
HRESULT hr(S_OK);
@ -3947,7 +3947,7 @@ int32_t AudioDeviceWindowsCore::_GetListDevice(EDataFlow dir,
int32_t AudioDeviceWindowsCore::_EnumerateEndpointDevicesAll(
EDataFlow dataFlow) const {
RTC_LOG(LS_VERBOSE) << __FUNCTION__;
RTC_DLOG(LS_VERBOSE) << __FUNCTION__;
assert(_ptrEnumerator != NULL);

View File

@ -95,12 +95,12 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
task_queue_factory_(task_queue_factory) {
RTC_CHECK(input_);
RTC_CHECK(output_);
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
}
~WindowsAudioDeviceModule() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
Terminate();
}
@ -110,7 +110,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t ActiveAudioLayer(
AudioDeviceModule::AudioLayer* audioLayer) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
// TODO(henrika): it might be possible to remove this unique signature.
*audioLayer = AudioDeviceModule::kWindowsCoreAudio2;
@ -118,14 +118,14 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int32_t RegisterAudioCallback(AudioTransport* audioCallback) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK(audio_device_buffer_);
RTC_DCHECK_RUN_ON(&thread_checker_);
return audio_device_buffer_->RegisterAudioCallback(audioCallback);
}
int32_t Init() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
RETURN_IF_INPUT_RESTARTS(0);
@ -153,7 +153,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int32_t Terminate() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
RETURN_IF_INPUT_RESTARTS(0);
@ -172,14 +172,14 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int16_t PlayoutDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
return output_->NumDevices();
}
int16_t RecordingDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(0);
return input_->NumDevices();
@ -188,7 +188,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t PlayoutDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
std::string name_str, guid_str;
@ -205,7 +205,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(0);
std::string name_str, guid_str;
@ -221,7 +221,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int32_t SetPlayoutDevice(uint16_t index) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
return output_->SetDevice(index);
@ -229,33 +229,33 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t SetPlayoutDevice(
AudioDeviceModule::WindowsDeviceType device) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
return output_->SetDevice(device);
}
int32_t SetRecordingDevice(uint16_t index) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
return input_->SetDevice(index);
}
int32_t SetRecordingDevice(
AudioDeviceModule::WindowsDeviceType device) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
return input_->SetDevice(device);
}
int32_t PlayoutIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = true;
return 0;
}
int32_t InitPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
RETURN_IF_OUTPUT_IS_INITIALIZED(0);
@ -263,21 +263,21 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
bool PlayoutIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(true);
return output_->PlayoutIsInitialized();
}
int32_t RecordingIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = true;
return 0;
}
int32_t InitRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(0);
RETURN_IF_INPUT_IS_INITIALIZED(0);
@ -285,14 +285,14 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
bool RecordingIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(true);
return input_->RecordingIsInitialized();
}
int32_t StartPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(0);
RETURN_IF_OUTPUT_IS_ACTIVE(0);
@ -300,21 +300,21 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int32_t StopPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(-1);
return output_->StopPlayout();
}
bool Playing() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_OUTPUT_RESTARTS(true);
return output_->Playing();
}
int32_t StartRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(0);
RETURN_IF_INPUT_IS_ACTIVE(0);
@ -322,41 +322,41 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
}
int32_t StopRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RETURN_IF_INPUT_RESTARTS(-1);
return input_->StopRecording();
}
bool Recording() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RETURN_IF_INPUT_RESTARTS(true);
return input_->Recording();
}
int32_t InitSpeaker() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RTC_DLOG(LS_WARNING) << "This method has no effect";
return initialized_ ? 0 : -1;
}
bool SpeakerIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RTC_DLOG(LS_WARNING) << "This method has no effect";
return initialized_;
}
int32_t InitMicrophone() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RTC_DLOG(LS_WARNING) << "This method has no effect";
return initialized_ ? 0 : -1;
}
bool MicrophoneIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
RTC_DLOG(LS_WARNING) << "This method has no effect";
return initialized_;
@ -364,7 +364,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t SpeakerVolumeIsAvailable(bool* available) override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = false;
return 0;
@ -377,7 +377,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t MicrophoneVolumeIsAvailable(bool* available) override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = false;
return 0;
@ -398,7 +398,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t StereoPlayoutIsAvailable(bool* available) const override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = true;
return 0;
@ -406,14 +406,14 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t SetStereoPlayout(bool enable) override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
return 0;
}
int32_t StereoPlayout(bool* enabled) const override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*enabled = true;
return 0;
@ -421,7 +421,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t StereoRecordingIsAvailable(bool* available) const override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*available = true;
return 0;
@ -429,14 +429,14 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest {
int32_t SetStereoRecording(bool enable) override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
return 0;
}
int32_t StereoRecording(bool* enabled) const override {
// TODO(henrika): improve support.
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK_RUN_ON(&thread_checker_);
*enabled = true;
return 0;
@ -513,7 +513,7 @@ CreateWindowsCoreAudioAudioDeviceModuleFromInputAndOutput(
std::unique_ptr<AudioInput> audio_input,
std::unique_ptr<AudioOutput> audio_output,
TaskQueueFactory* task_queue_factory) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return new rtc::RefCountedObject<WindowsAudioDeviceModule>(
std::move(audio_input), std::move(audio_output), task_queue_factory);
}

View File

@ -42,8 +42,6 @@ int32_t DeviceInfoLinux::Init() {
DeviceInfoLinux::~DeviceInfoLinux() {}
uint32_t DeviceInfoLinux::NumberOfDevices() {
RTC_LOG(LS_INFO) << __FUNCTION__;
uint32_t count = 0;
char device[20];
int fd = -1;
@ -75,8 +73,6 @@ int32_t DeviceInfoLinux::GetDeviceName(uint32_t deviceNumber,
uint32_t deviceUniqueIdUTF8Length,
char* /*productUniqueIdUTF8*/,
uint32_t /*productUniqueIdUTF8Length*/) {
RTC_LOG(LS_INFO) << __FUNCTION__;
// Travel through /dev/video [0-63]
uint32_t count = 0;
char device[20];

View File

@ -72,7 +72,7 @@ DeviceInfoDS::DeviceInfoDS()
// Details: hr = 0x80010106 <=> "Cannot change thread mode after it is
// set".
//
RTC_LOG(LS_INFO) << __FUNCTION__
RTC_DLOG(LS_INFO) << __FUNCTION__
<< ": CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)"
" => RPC_E_CHANGED_MODE, error 0x"
<< rtc::ToHex(hr);
@ -203,7 +203,7 @@ int32_t DeviceInfoDS::GetDeviceInfo(uint32_t deviceNumber,
}
}
if (deviceNameLength) {
RTC_LOG(LS_INFO) << __FUNCTION__ << " " << deviceNameUTF8;
RTC_DLOG(LS_INFO) << __FUNCTION__ << " " << deviceNameUTF8;
}
return index;
}

View File

@ -57,7 +57,7 @@ void GetDefaultAudioParameters(JNIEnv* env,
rtc::scoped_refptr<AudioDeviceModule> CreateAAudioAudioDeviceModule(
JNIEnv* env,
jobject application_context) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Get default audio input/output parameters.
AudioParameters input_parameters;
AudioParameters output_parameters;
@ -76,7 +76,7 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAAudioAudioDeviceModule(
rtc::scoped_refptr<AudioDeviceModule> CreateJavaAudioDeviceModule(
JNIEnv* env,
jobject application_context) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Get default audio input/output parameters.
const JavaParamRef<jobject> j_context(application_context);
const ScopedJavaLocalRef<jobject> j_audio_manager =
@ -104,7 +104,7 @@ rtc::scoped_refptr<AudioDeviceModule> CreateJavaAudioDeviceModule(
rtc::scoped_refptr<AudioDeviceModule> CreateOpenSLESAudioDeviceModule(
JNIEnv* env,
jobject application_context) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Get default audio input/output parameters.
AudioParameters input_parameters;
AudioParameters output_parameters;
@ -127,7 +127,7 @@ rtc::scoped_refptr<AudioDeviceModule> CreateOpenSLESAudioDeviceModule(
rtc::scoped_refptr<AudioDeviceModule>
CreateJavaInputAndOpenSLESOutputAudioDeviceModule(JNIEnv* env,
jobject application_context) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
// Get default audio input/output parameters.
const JavaParamRef<jobject> j_context(application_context);
const ScopedJavaLocalRef<jobject> j_audio_manager =

View File

@ -70,26 +70,26 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
initialized_(false) {
RTC_CHECK(input_);
RTC_CHECK(output_);
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
thread_checker_.Detach();
}
~AndroidAudioDeviceModule() override { RTC_LOG(INFO) << __FUNCTION__; }
~AndroidAudioDeviceModule() override { RTC_DLOG(INFO) << __FUNCTION__; }
int32_t ActiveAudioLayer(
AudioDeviceModule::AudioLayer* audioLayer) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*audioLayer = audio_layer_;
return 0;
}
int32_t RegisterAudioCallback(AudioTransport* audioCallback) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return audio_device_buffer_->RegisterAudioCallback(audioCallback);
}
int32_t Init() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DCHECK(thread_checker_.IsCurrent());
audio_device_buffer_ =
std::make_unique<AudioDeviceBuffer>(task_queue_factory_.get());
@ -118,7 +118,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t Terminate() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return 0;
RTC_DCHECK(thread_checker_.IsCurrent());
@ -132,19 +132,19 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
bool Initialized() const override {
RTC_LOG(INFO) << __FUNCTION__ << ":" << initialized_;
RTC_DLOG(INFO) << __FUNCTION__ << ":" << initialized_;
return initialized_;
}
int16_t PlayoutDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_LOG(INFO) << "output: " << 1;
return 1;
}
int16_t RecordingDevices() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(INFO) << "output: " << 1;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << "output: " << 1;
return 1;
}
@ -163,7 +163,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
int32_t SetPlayoutDevice(uint16_t index) override {
// OK to use but it has no effect currently since device selection is
// done using Andoid APIs instead.
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ")";
return 0;
}
@ -175,7 +175,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
int32_t SetRecordingDevice(uint16_t index) override {
// OK to use but it has no effect currently since device selection is
// done using Andoid APIs instead.
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ")";
return 0;
}
@ -185,66 +185,66 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t PlayoutIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*available = true;
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return 0;
}
int32_t InitPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (PlayoutIsInitialized()) {
return 0;
}
int32_t result = output_->InitPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
bool PlayoutIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_->PlayoutIsInitialized();
}
int32_t RecordingIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*available = true;
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return 0;
}
int32_t InitRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (RecordingIsInitialized()) {
return 0;
}
int32_t result = input_->InitRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool RecordingIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return input_->RecordingIsInitialized();
}
int32_t StartPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (Playing()) {
return 0;
}
int32_t result = output_->StartPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartPlayoutSuccess",
static_cast<int>(result == 0));
if (result == 0) {
@ -256,7 +256,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t StopPlayout() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (!Playing())
@ -264,26 +264,26 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
RTC_LOG(INFO) << __FUNCTION__;
audio_device_buffer_->StopPlayout();
int32_t result = output_->StopPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
bool Playing() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return output_->Playing();
}
int32_t StartRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (Recording()) {
return 0;
}
int32_t result = input_->StartRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartRecordingSuccess",
static_cast<int>(result == 0));
if (result == 0) {
@ -295,74 +295,74 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t StopRecording() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
if (!Recording())
return 0;
audio_device_buffer_->StopRecording();
int32_t result = input_->StopRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool Recording() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return input_->Recording();
}
int32_t InitSpeaker() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return initialized_ ? 0 : -1;
}
bool SpeakerIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return initialized_;
}
int32_t InitMicrophone() override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return initialized_ ? 0 : -1;
}
bool MicrophoneIsInitialized() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return initialized_;
}
int32_t SpeakerVolumeIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
*available = output_->SpeakerVolumeIsAvailable();
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return 0;
}
int32_t SetSpeakerVolume(uint32_t volume) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
return output_->SetSpeakerVolume(volume);
}
int32_t SpeakerVolume(uint32_t* output_volume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
absl::optional<uint32_t> volume = output_->SpeakerVolume();
if (!volume)
return -1;
*output_volume = *volume;
RTC_LOG(INFO) << "output: " << *volume;
RTC_DLOG(INFO) << "output: " << *volume;
return 0;
}
int32_t MaxSpeakerVolume(uint32_t* output_max_volume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
absl::optional<uint32_t> max_volume = output_->MaxSpeakerVolume();
@ -373,7 +373,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t MinSpeakerVolume(uint32_t* output_min_volume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return -1;
absl::optional<uint32_t> min_volume = output_->MinSpeakerVolume();
@ -384,71 +384,71 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t MicrophoneVolumeIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*available = false;
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return -1;
}
int32_t SetMicrophoneVolume(uint32_t volume) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_CHECK_NOTREACHED();
}
int32_t MicrophoneVolume(uint32_t* volume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t MinMicrophoneVolume(uint32_t* minVolume) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t SpeakerMuteIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t SetSpeakerMute(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK_NOTREACHED();
}
int32_t SpeakerMute(bool* enabled) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t MicrophoneMuteIsAvailable(bool* available) override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t SetMicrophoneMute(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK_NOTREACHED();
}
int32_t MicrophoneMute(bool* enabled) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_CHECK_NOTREACHED();
}
int32_t StereoPlayoutIsAvailable(bool* available) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*available = is_stereo_playout_supported_;
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return 0;
}
int32_t SetStereoPlayout(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
// Android does not support changes between mono and stero on the fly. The
// use of stereo or mono is determined by the audio layer. It is allowed
// to call this method if that same state is not modified.
@ -461,21 +461,21 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t StereoPlayout(bool* enabled) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*enabled = is_stereo_playout_supported_;
RTC_LOG(INFO) << "output: " << *enabled;
RTC_DLOG(INFO) << "output: " << *enabled;
return 0;
}
int32_t StereoRecordingIsAvailable(bool* available) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*available = is_stereo_record_supported_;
RTC_LOG(INFO) << "output: " << *available;
RTC_DLOG(INFO) << "output: " << *available;
return 0;
}
int32_t SetStereoRecording(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
// Android does not support changes between mono and stero on the fly. The
// use of stereo or mono is determined by the audio layer. It is allowed
// to call this method if that same state is not modified.
@ -488,9 +488,9 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t StereoRecording(bool* enabled) const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
*enabled = is_stereo_record_supported_;
RTC_LOG(INFO) << "output: " << *enabled;
RTC_DLOG(INFO) << "output: " << *enabled;
return 0;
}
@ -514,18 +514,18 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
// a "Not Implemented" log will be filed. This non-perfect state will remain
// until I have added full support for audio effects based on OpenSL ES APIs.
bool BuiltInAECIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return false;
bool isAvailable = input_->IsAcousticEchoCancelerSupported();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return isAvailable;
}
// Not implemented for any input device on Android.
bool BuiltInAGCIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_LOG(INFO) << "output: " << false;
RTC_DLOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << "output: " << false;
return false;
}
@ -534,38 +534,38 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
// TODO(henrika): add implementation for OpenSL ES based audio as well.
// In addition, see comments for BuiltInAECIsAvailable().
bool BuiltInNSIsAvailable() const override {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return false;
bool isAvailable = input_->IsNoiseSuppressorSupported();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return isAvailable;
}
// TODO(henrika): add implementation for OpenSL ES based audio as well.
int32_t EnableBuiltInAEC(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
if (!initialized_)
return -1;
RTC_CHECK(BuiltInAECIsAvailable()) << "HW AEC is not available";
int32_t result = input_->EnableBuiltInAEC(enable);
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
return result;
}
int32_t EnableBuiltInAGC(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_CHECK_NOTREACHED();
}
// TODO(henrika): add implementation for OpenSL ES based audio as well.
int32_t EnableBuiltInNS(bool enable) override {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
if (!initialized_)
return -1;
RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available";
int32_t result = input_->EnableBuiltInNS(enable);
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
return result;
}
@ -576,7 +576,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule {
}
int32_t AttachAudioBuffer() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
output_->AttachAudioBuffer(audio_device_buffer_.get());
input_->AttachAudioBuffer(audio_device_buffer_.get());
return 0;
@ -640,7 +640,7 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModuleFromInputAndOutput(
uint16_t playout_delay_ms,
std::unique_ptr<AudioInput> audio_input,
std::unique_ptr<AudioOutput> audio_output) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return new rtc::RefCountedObject<AndroidAudioDeviceModule>(
audio_layer, is_stereo_playout_supported, is_stereo_record_supported,
playout_delay_ms, std::move(audio_input), std::move(audio_output));

View File

@ -18,7 +18,7 @@
namespace webrtc {
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModule(bool bypass_voice_processing) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
#if defined(WEBRTC_IOS)
return new rtc::RefCountedObject<ios_adm::AudioDeviceModuleIOS>(bypass_voice_processing);
#else

View File

@ -19,7 +19,7 @@
namespace webrtc {
std::unique_ptr<rtc::NetworkMonitorFactory> CreateNetworkMonitorFactory() {
RTC_LOG(LS_INFO) << __FUNCTION__;
RTC_DLOG(LS_INFO) << __FUNCTION__;
#if defined(WEBRTC_IOS)
return std::make_unique<ObjCNetworkMonitorFactory>();
#else

View File

@ -48,17 +48,17 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::AttachAudioBuffer() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
audio_device_->AttachAudioBuffer(audio_device_buffer_.get());
return 0;
}
AudioDeviceModuleIOS::~AudioDeviceModuleIOS() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
}
int32_t AudioDeviceModuleIOS::ActiveAudioLayer(AudioLayer* audioLayer) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
AudioLayer activeAudio;
if (audio_device_->ActiveAudioLayer(activeAudio) == -1) {
return -1;
@ -68,7 +68,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::Init() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (initialized_)
return 0;
@ -91,7 +91,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::Terminate() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
if (!initialized_)
return 0;
if (audio_device_->Terminate() == -1) {
@ -102,65 +102,65 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
bool AudioDeviceModuleIOS::Initialized() const {
RTC_LOG(INFO) << __FUNCTION__ << ": " << initialized_;
RTC_DLOG(INFO) << __FUNCTION__ << ": " << initialized_;
return initialized_;
}
int32_t AudioDeviceModuleIOS::InitSpeaker() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->InitSpeaker();
}
int32_t AudioDeviceModuleIOS::InitMicrophone() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->InitMicrophone();
}
int32_t AudioDeviceModuleIOS::SpeakerVolumeIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->SpeakerVolumeIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetSpeakerVolume(uint32_t volume) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << volume << ")";
CHECKinitialized_();
return audio_device_->SetSpeakerVolume(volume);
}
int32_t AudioDeviceModuleIOS::SpeakerVolume(uint32_t* volume) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
uint32_t level = 0;
if (audio_device_->SpeakerVolume(level) == -1) {
return -1;
}
*volume = level;
RTC_LOG(INFO) << "output: " << *volume;
RTC_DLOG(INFO) << "output: " << *volume;
return 0;
}
bool AudioDeviceModuleIOS::SpeakerIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isInitialized = audio_device_->SpeakerIsInitialized();
RTC_LOG(INFO) << "output: " << isInitialized;
RTC_DLOG(INFO) << "output: " << isInitialized;
return isInitialized;
}
bool AudioDeviceModuleIOS::MicrophoneIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isInitialized = audio_device_->MicrophoneIsInitialized();
RTC_LOG(INFO) << "output: " << isInitialized;
RTC_DLOG(INFO) << "output: " << isInitialized;
return isInitialized;
}
@ -185,110 +185,110 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::SpeakerMuteIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->SpeakerMuteIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetSpeakerMute(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
return audio_device_->SetSpeakerMute(enable);
}
int32_t AudioDeviceModuleIOS::SpeakerMute(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool muted = false;
if (audio_device_->SpeakerMute(muted) == -1) {
return -1;
}
*enabled = muted;
RTC_LOG(INFO) << "output: " << muted;
RTC_DLOG(INFO) << "output: " << muted;
return 0;
}
int32_t AudioDeviceModuleIOS::MicrophoneMuteIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->MicrophoneMuteIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetMicrophoneMute(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
return (audio_device_->SetMicrophoneMute(enable));
}
int32_t AudioDeviceModuleIOS::MicrophoneMute(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool muted = false;
if (audio_device_->MicrophoneMute(muted) == -1) {
return -1;
}
*enabled = muted;
RTC_LOG(INFO) << "output: " << muted;
RTC_DLOG(INFO) << "output: " << muted;
return 0;
}
int32_t AudioDeviceModuleIOS::MicrophoneVolumeIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->MicrophoneVolumeIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetMicrophoneVolume(uint32_t volume) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << volume << ")";
CHECKinitialized_();
return (audio_device_->SetMicrophoneVolume(volume));
}
int32_t AudioDeviceModuleIOS::MicrophoneVolume(uint32_t* volume) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
uint32_t level = 0;
if (audio_device_->MicrophoneVolume(level) == -1) {
return -1;
}
*volume = level;
RTC_LOG(INFO) << "output: " << *volume;
RTC_DLOG(INFO) << "output: " << *volume;
return 0;
}
int32_t AudioDeviceModuleIOS::StereoRecordingIsAvailable(
bool* available) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->StereoRecordingIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetStereoRecording(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
if (enable) {
RTC_LOG(WARNING) << "recording in stereo is not supported";
@ -297,31 +297,31 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::StereoRecording(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool stereo = false;
if (audio_device_->StereoRecording(stereo) == -1) {
return -1;
}
*enabled = stereo;
RTC_LOG(INFO) << "output: " << stereo;
RTC_DLOG(INFO) << "output: " << stereo;
return 0;
}
int32_t AudioDeviceModuleIOS::StereoPlayoutIsAvailable(bool* available) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->StereoPlayoutIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::SetStereoPlayout(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
if (audio_device_->PlayoutIsInitialized()) {
RTC_LOG(LERROR)
@ -341,38 +341,38 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int32_t AudioDeviceModuleIOS::StereoPlayout(bool* enabled) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool stereo = false;
if (audio_device_->StereoPlayout(stereo) == -1) {
return -1;
}
*enabled = stereo;
RTC_LOG(INFO) << "output: " << stereo;
RTC_DLOG(INFO) << "output: " << stereo;
return 0;
}
int32_t AudioDeviceModuleIOS::PlayoutIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->PlayoutIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
int32_t AudioDeviceModuleIOS::RecordingIsAvailable(bool* available) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
bool isAvailable = false;
if (audio_device_->RecordingIsAvailable(isAvailable) == -1) {
return -1;
}
*available = isAvailable;
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return 0;
}
@ -397,21 +397,21 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
int16_t AudioDeviceModuleIOS::PlayoutDevices() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
uint16_t nPlayoutDevices = audio_device_->PlayoutDevices();
RTC_LOG(INFO) << "output: " << nPlayoutDevices;
RTC_DLOG(INFO) << "output: " << nPlayoutDevices;
return (int16_t)(nPlayoutDevices);
}
int32_t AudioDeviceModuleIOS::SetPlayoutDevice(uint16_t index) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ")";
CHECKinitialized_();
return audio_device_->SetPlayoutDevice(index);
}
int32_t AudioDeviceModuleIOS::SetPlayoutDevice(WindowsDeviceType device) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->SetPlayoutDevice(device);
}
@ -420,7 +420,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
CHECKinitialized_();
if (name == NULL) {
return -1;
@ -429,10 +429,10 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
return -1;
}
if (name != NULL) {
RTC_LOG(INFO) << "output: name = " << name;
RTC_DLOG(INFO) << "output: name = " << name;
}
if (guid != NULL) {
RTC_LOG(INFO) << "output: guid = " << guid;
RTC_DLOG(INFO) << "output: guid = " << guid;
}
return 0;
}
@ -441,7 +441,7 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ", ...)";
CHECKinitialized_();
if (name == NULL) {
return -1;
@ -450,137 +450,137 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
return -1;
}
if (name != NULL) {
RTC_LOG(INFO) << "output: name = " << name;
RTC_DLOG(INFO) << "output: name = " << name;
}
if (guid != NULL) {
RTC_LOG(INFO) << "output: guid = " << guid;
RTC_DLOG(INFO) << "output: guid = " << guid;
}
return 0;
}
int16_t AudioDeviceModuleIOS::RecordingDevices() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
uint16_t nRecordingDevices = audio_device_->RecordingDevices();
RTC_LOG(INFO) << "output: " << nRecordingDevices;
RTC_DLOG(INFO) << "output: " << nRecordingDevices;
return (int16_t)nRecordingDevices;
}
int32_t AudioDeviceModuleIOS::SetRecordingDevice(uint16_t index) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << index << ")";
CHECKinitialized_();
return audio_device_->SetRecordingDevice(index);
}
int32_t AudioDeviceModuleIOS::SetRecordingDevice(WindowsDeviceType device) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
return audio_device_->SetRecordingDevice(device);
}
int32_t AudioDeviceModuleIOS::InitPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
if (PlayoutIsInitialized()) {
return 0;
}
int32_t result = audio_device_->InitPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleIOS::InitRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
if (RecordingIsInitialized()) {
return 0;
}
int32_t result = audio_device_->InitRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleIOS::PlayoutIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->PlayoutIsInitialized();
}
bool AudioDeviceModuleIOS::RecordingIsInitialized() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->RecordingIsInitialized();
}
int32_t AudioDeviceModuleIOS::StartPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
if (Playing()) {
return 0;
}
audio_device_buffer_.get()->StartPlayout();
int32_t result = audio_device_->StartPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleIOS::StopPlayout() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
int32_t result = audio_device_->StopPlayout();
audio_device_buffer_.get()->StopPlayout();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopPlayoutSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleIOS::Playing() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->Playing();
}
int32_t AudioDeviceModuleIOS::StartRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
if (Recording()) {
return 0;
}
audio_device_buffer_.get()->StartRecording();
int32_t result = audio_device_->StartRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
int32_t AudioDeviceModuleIOS::StopRecording() {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized_();
int32_t result = audio_device_->StopRecording();
audio_device_buffer_.get()->StopRecording();
RTC_LOG(INFO) << "output: " << result;
RTC_DLOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopRecordingSuccess",
static_cast<int>(result == 0));
return result;
}
bool AudioDeviceModuleIOS::Recording() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
return audio_device_->Recording();
}
int32_t AudioDeviceModuleIOS::RegisterAudioCallback(
AudioTransport* audioCallback) {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
return audio_device_buffer_.get()->RegisterAudioCallback(audioCallback);
}
@ -596,50 +596,50 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
}
bool AudioDeviceModuleIOS::BuiltInAECIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInAECIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleIOS::EnableBuiltInAEC(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInAEC(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_DLOG(INFO) << "output: " << ok;
return ok;
}
bool AudioDeviceModuleIOS::BuiltInAGCIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInAGCIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleIOS::EnableBuiltInAGC(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInAGC(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_DLOG(INFO) << "output: " << ok;
return ok;
}
bool AudioDeviceModuleIOS::BuiltInNSIsAvailable() const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
CHECKinitialized__BOOL();
bool isAvailable = audio_device_->BuiltInNSIsAvailable();
RTC_LOG(INFO) << "output: " << isAvailable;
RTC_DLOG(INFO) << "output: " << isAvailable;
return isAvailable;
}
int32_t AudioDeviceModuleIOS::EnableBuiltInNS(bool enable) {
RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
RTC_DLOG(INFO) << __FUNCTION__ << "(" << enable << ")";
CHECKinitialized_();
int32_t ok = audio_device_->EnableBuiltInNS(enable);
RTC_LOG(INFO) << "output: " << ok;
RTC_DLOG(INFO) << "output: " << ok;
return ok;
}
@ -653,17 +653,17 @@ AudioDeviceModuleIOS::AudioDeviceModuleIOS(bool bypass_voice_processing)
#if defined(WEBRTC_IOS)
int AudioDeviceModuleIOS::GetPlayoutAudioParameters(
AudioParameters* params) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
int r = audio_device_->GetPlayoutAudioParameters(params);
RTC_LOG(INFO) << "output: " << r;
RTC_DLOG(INFO) << "output: " << r;
return r;
}
int AudioDeviceModuleIOS::GetRecordAudioParameters(
AudioParameters* params) const {
RTC_LOG(INFO) << __FUNCTION__;
RTC_DLOG(INFO) << __FUNCTION__;
int r = audio_device_->GetRecordAudioParameters(params);
RTC_LOG(INFO) << "output: " << r;
RTC_DLOG(INFO) << "output: " << r;
return r;
}
#endif // WEBRTC_IOS