Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc

Issue 2978083002: Replace WEBRTC_TRACE logging in modules/audio_device/linux/ (Closed)
Patch Set: Identical, no deps. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
index 1a30fec27495574d0dd41938a4b462df7fe28422..8bc63c3806f2f29cae493d3036be4a557b04ff9c 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
@@ -11,7 +11,7 @@
#include <assert.h>
#include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h"
-#include "webrtc/system_wrappers/include/trace.h"
+#include "webrtc/rtc_base/logging.h"
extern webrtc::adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
@@ -24,15 +24,13 @@ extern webrtc::adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
namespace webrtc
{
-AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA(const int32_t id) :
- _id(id),
+AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA() :
_outputMixerHandle(NULL),
_inputMixerHandle(NULL),
_outputMixerElement(NULL),
_inputMixerElement(NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
- "%s constructed", __FUNCTION__);
+ LOG(LS_INFO) << __FUNCTION__ << " created";
memset(_outputMixerStr, 0, kAdmMaxDeviceNameSize);
memset(_inputMixerStr, 0, kAdmMaxDeviceNameSize);
@@ -40,8 +38,7 @@ AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA(const int32_t id) :
AudioMixerManagerLinuxALSA::~AudioMixerManagerLinuxALSA()
{
- WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
- "%s destructed", __FUNCTION__);
+ LOG(LS_INFO) << __FUNCTION__ << " destroyed";
Close();
}
@@ -51,8 +48,7 @@ AudioMixerManagerLinuxALSA::~AudioMixerManagerLinuxALSA()
int32_t AudioMixerManagerLinuxALSA::Close()
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "%s",
- __FUNCTION__);
+ LOG(LS_VERBOSE) << __FUNCTION__;
rtc::CritScope lock(&_critSect);
@@ -65,8 +61,7 @@ int32_t AudioMixerManagerLinuxALSA::Close()
int32_t AudioMixerManagerLinuxALSA::CloseSpeaker()
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "%s",
- __FUNCTION__);
+ LOG(LS_VERBOSE) << __FUNCTION__;
rtc::CritScope lock(&_critSect);
@@ -74,28 +69,24 @@ int32_t AudioMixerManagerLinuxALSA::CloseSpeaker()
if (_outputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing playout mixer");
+ LOG(LS_VERBOSE) << "Closing playout mixer";
LATE(snd_mixer_free)(_outputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error freeing playout mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error freeing playout mixer: "
+ << LATE(snd_strerror)(errVal);
}
errVal = LATE(snd_mixer_detach)(_outputMixerHandle, _outputMixerStr);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error detachinging playout mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error detaching playout mixer: "
+ << LATE(snd_strerror)(errVal);
}
errVal = LATE(snd_mixer_close)(_outputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error snd_mixer_close(handleMixer) errVal=%d",
- errVal);
+ LOG(LS_ERROR) << "Error snd_mixer_close(handleMixer) errVal="
+ << errVal;
}
_outputMixerHandle = NULL;
_outputMixerElement = NULL;
@@ -107,7 +98,7 @@ int32_t AudioMixerManagerLinuxALSA::CloseSpeaker()
int32_t AudioMixerManagerLinuxALSA::CloseMicrophone()
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "%s", __FUNCTION__);
+ LOG(LS_VERBOSE) << __FUNCTION__;
rtc::CritScope lock(&_critSect);
@@ -115,39 +106,32 @@ int32_t AudioMixerManagerLinuxALSA::CloseMicrophone()
if (_inputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer");
+ LOG(LS_VERBOSE) << "Closing record mixer";
LATE(snd_mixer_free)(_inputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error freeing record mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error freeing record mixer: "
+ << LATE(snd_strerror)(errVal);
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer 2");
+ LOG(LS_VERBOSE) << "Closing record mixer 2";
errVal = LATE(snd_mixer_detach)(_inputMixerHandle, _inputMixerStr);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error detachinging record mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error detaching record mixer: "
+ << LATE(snd_strerror)(errVal);
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer 3");
+ LOG(LS_VERBOSE) << "Closing record mixer 3";
errVal = LATE(snd_mixer_close)(_inputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error snd_mixer_close(handleMixer) errVal=%d",
- errVal);
+ LOG(LS_ERROR) << "Error snd_mixer_close(handleMixer) errVal="
+ << errVal;
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer 4");
+ LOG(LS_VERBOSE) << "Closing record mixer 4";
_inputMixerHandle = NULL;
_inputMixerElement = NULL;
}
@@ -158,8 +142,8 @@ int32_t AudioMixerManagerLinuxALSA::CloseMicrophone()
int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::OpenSpeaker(name=%s)", deviceName);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::OpenSpeaker(name="
+ << deviceName << ")";
rtc::CritScope lock(&_critSect);
@@ -169,29 +153,25 @@ int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
//
if (_outputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing playout mixer");
+ LOG(LS_VERBOSE) << "Closing playout mixer";
LATE(snd_mixer_free)(_outputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error freeing playout mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error freeing playout mixer: "
+ << LATE(snd_strerror)(errVal);
}
errVal = LATE(snd_mixer_detach)(_outputMixerHandle, _outputMixerStr);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error detachinging playout mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error detaching playout mixer: "
+ << LATE(snd_strerror)(errVal);
}
errVal = LATE(snd_mixer_close)(_outputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error snd_mixer_close(handleMixer) errVal=%d",
- errVal);
+ LOG(LS_ERROR) << "Error snd_mixer_close(handleMixer) errVal="
+ << errVal;
}
}
_outputMixerHandle = NULL;
@@ -200,23 +180,21 @@ int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
errVal = LATE(snd_mixer_open)(&_outputMixerHandle, 0);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "snd_mixer_open(&_outputMixerHandle, 0) - error");
+ LOG(LS_ERROR) << "snd_mixer_open(&_outputMixerHandle, 0) - error";
return -1;
}
char controlName[kAdmMaxDeviceNameSize] = { 0 };
GetControlName(controlName, deviceName);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " snd_mixer_attach(_outputMixerHandle, %s)", controlName);
+ LOG(LS_VERBOSE) << "snd_mixer_attach(_outputMixerHandle, " << controlName
+ << ")";
errVal = LATE(snd_mixer_attach)(_outputMixerHandle, controlName);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_attach(_outputMixerHandle, %s) error: %s",
- controlName, LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "snd_mixer_attach(_outputMixerHandle, " << controlName
+ << ") error: " << LATE(snd_strerror)(errVal);
_outputMixerHandle = NULL;
return -1;
}
@@ -225,10 +203,9 @@ int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
errVal = LATE(snd_mixer_selem_register)(_outputMixerHandle, NULL, NULL);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_selem_register(_outputMixerHandle,"
- " NULL, NULL), error: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR)
+ << "snd_mixer_selem_register(_outputMixerHandle, NULL, NULL), "
+ << "error: " << LATE(snd_strerror)(errVal);
_outputMixerHandle = NULL;
return -1;
}
@@ -241,9 +218,8 @@ int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
if (_outputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " the output mixer device is now open (0x%x)",
- _outputMixerHandle);
+ LOG(LS_VERBOSE) << "the output mixer device is now open ("
+ << _outputMixerHandle << ")";
}
return 0;
@@ -251,9 +227,8 @@ int32_t AudioMixerManagerLinuxALSA::OpenSpeaker(char* deviceName)
int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::OpenMicrophone(name=%s)",
- deviceName);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::OpenMicrophone(name="
+ << deviceName << ")";
rtc::CritScope lock(&_critSect);
@@ -263,38 +238,31 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
//
if (_inputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer");
+ LOG(LS_VERBOSE) << "Closing record mixer";
LATE(snd_mixer_free)(_inputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error freeing record mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error freeing record mixer: "
+ << LATE(snd_strerror)(errVal);
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer");
+ LOG(LS_VERBOSE) << "Closing record mixer";
errVal = LATE(snd_mixer_detach)(_inputMixerHandle, _inputMixerStr);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error detachinging record mixer: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error detaching record mixer: "
+ << LATE(snd_strerror)(errVal);
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer");
+ LOG(LS_VERBOSE) << "Closing record mixer";
errVal = LATE(snd_mixer_close)(_inputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error snd_mixer_close(handleMixer) errVal=%d",
- errVal);
+ LOG(LS_ERROR) << "Error snd_mixer_close(handleMixer) errVal="
+ << errVal;
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "Closing record mixer");
+ LOG(LS_VERBOSE) << "Closing record mixer";
}
_inputMixerHandle = NULL;
_inputMixerElement = NULL;
@@ -302,23 +270,21 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
errVal = LATE(snd_mixer_open)(&_inputMixerHandle, 0);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_open(&_inputMixerHandle, 0) - error");
+ LOG(LS_ERROR) << "snd_mixer_open(&_inputMixerHandle, 0) - error";
return -1;
}
char controlName[kAdmMaxDeviceNameSize] = { 0 };
GetControlName(controlName, deviceName);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " snd_mixer_attach(_inputMixerHandle, %s)", controlName);
+ LOG(LS_VERBOSE) << "snd_mixer_attach(_inputMixerHandle, " << controlName
+ << ")";
errVal = LATE(snd_mixer_attach)(_inputMixerHandle, controlName);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_attach(_inputMixerHandle, %s) error: %s",
- controlName, LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "snd_mixer_attach(_inputMixerHandle, " << controlName
+ << ") error: " << LATE(snd_strerror)(errVal);
_inputMixerHandle = NULL;
return -1;
@@ -328,10 +294,9 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
errVal = LATE(snd_mixer_selem_register)(_inputMixerHandle, NULL, NULL);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_selem_register(_inputMixerHandle,"
- " NULL, NULL), error: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR)
+ << "snd_mixer_selem_register(_inputMixerHandle, NULL, NULL), "
+ << "error: " << LATE(snd_strerror)(errVal);
_inputMixerHandle = NULL;
return -1;
@@ -344,9 +309,8 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
if (_inputMixerHandle != NULL)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " the input mixer device is now open (0x%x)",
- _inputMixerHandle);
+ LOG(LS_VERBOSE) << "the input mixer device is now open ("
+ << _inputMixerHandle << ")";
}
return 0;
@@ -354,15 +318,14 @@ int32_t AudioMixerManagerLinuxALSA::OpenMicrophone(char *deviceName)
bool AudioMixerManagerLinuxALSA::SpeakerIsInitialized() const
{
- WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id, "%s", __FUNCTION__);
+ LOG(LS_INFO) << __FUNCTION__;
return (_outputMixerHandle != NULL);
}
bool AudioMixerManagerLinuxALSA::MicrophoneIsInitialized() const
{
- WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id, "%s",
- __FUNCTION__);
+ LOG(LS_INFO) << __FUNCTION__;
return (_inputMixerHandle != NULL);
}
@@ -370,16 +333,14 @@ bool AudioMixerManagerLinuxALSA::MicrophoneIsInitialized() const
int32_t AudioMixerManagerLinuxALSA::SetSpeakerVolume(
uint32_t volume)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::SetSpeakerVolume(volume=%u)",
- volume);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetSpeakerVolume(volume="
+ << volume << ")";
rtc::CritScope lock(&_critSect);
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -388,9 +349,8 @@ int32_t AudioMixerManagerLinuxALSA::SetSpeakerVolume(
volume);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error changing master volume: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error changing master volume: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -403,8 +363,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerVolume(
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -417,14 +376,12 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerVolume(
&vol);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Error getting outputvolume: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting outputvolume: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " AudioMixerManagerLinuxALSA::SpeakerVolume() => vol=%i",
- vol);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SpeakerVolume() => vol="
+ << vol;
volume = static_cast<uint32_t> (vol);
@@ -437,8 +394,7 @@ int32_t AudioMixerManagerLinuxALSA::MaxSpeakerVolume(
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avilable output mixer element exists");
+ LOG(LS_WARNING) << "no avilable output mixer element exists";
return -1;
}
@@ -449,15 +405,13 @@ int32_t AudioMixerManagerLinuxALSA::MaxSpeakerVolume(
LATE(snd_mixer_selem_get_playback_volume_range)(_outputMixerElement,
&minVol, &maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Playout hardware volume range, min: %d, max: %d",
- minVol, maxVol);
+ LOG(LS_VERBOSE) << "Playout hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (maxVol <= minVol)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting get_playback_volume_range: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting get_playback_volume_range: "
+ << LATE(snd_strerror)(errVal);
}
maxVolume = static_cast<uint32_t> (maxVol);
@@ -471,8 +425,7 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -483,15 +436,13 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
LATE(snd_mixer_selem_get_playback_volume_range)(_outputMixerElement,
&minVol, &maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Playout hardware volume range, min: %d, max: %d",
- minVol, maxVol);
+ LOG(LS_VERBOSE) << "Playout hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (maxVol <= minVol)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting get_playback_volume_range: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting get_playback_volume_range: "
+ << LATE(snd_strerror)(errVal);
}
minVolume = static_cast<uint32_t> (minVol);
@@ -512,8 +463,7 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -524,19 +474,19 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
_outputMixerElement, &minVol, &maxVol);
if ((maxVol <= minVol) || (errVal != 0))
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " Error getting playback volume range: %s", snd_strerror(errVal));
+ LOG(LS_WARNING) << "Error getting playback volume range: "
+ << snd_strerror(errVal);
}
maxVol = maxVolume;
errVal = snd_mixer_selem_set_playback_volume_range(
_outputMixerElement, minVol, maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Playout hardware volume range, min: %d, max: %d", minVol, maxVol);
+ LOG(LS_VERBOSE) << "Playout hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (errVal != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting playback volume range: %s", snd_strerror(errVal));
+ LOG(LS_ERROR) << "Error setting playback volume range: "
+ << snd_strerror(errVal);
return -1;
}
@@ -553,8 +503,7 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -565,19 +514,19 @@ int32_t AudioMixerManagerLinuxALSA::MinSpeakerVolume(
_outputMixerElement, &minVol, &maxVol);
if ((maxVol <= minVol) || (errVal != 0))
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " Error getting playback volume range: %s", snd_strerror(errVal));
+ LOG(LS_WARNING) << "Error getting playback volume range: "
+ << snd_strerror(errVal);
}
minVol = minVolume;
errVal = snd_mixer_selem_set_playback_volume_range(
_outputMixerElement, minVol, maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Playout hardware volume range, min: %d, max: %d", minVol, maxVol);
+ LOG(LS_VERBOSE) << "Playout hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (errVal != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting playback volume range: %s", snd_strerror(errVal));
+ LOG(LS_ERROR) << "Error setting playback volume range: "
+ << snd_strerror(errVal);
return -1;
}
@@ -591,8 +540,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerVolumeStepSize(
if (_outputMixerHandle == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer exists");
+ LOG(LS_WARNING) << "no avaliable output mixer exists";
return -1;
}
@@ -607,8 +555,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerVolumeIsAvailable(
{
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -622,8 +569,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerMuteIsAvailable(
{
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -634,16 +580,14 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerMuteIsAvailable(
int32_t AudioMixerManagerLinuxALSA::SetSpeakerMute(bool enable)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::SetSpeakerMute(enable=%u)",
- enable);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetSpeakerMute(enable="
+ << enable << ")";
rtc::CritScope lock(&_critSect);
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -652,8 +596,7 @@ int32_t AudioMixerManagerLinuxALSA::SetSpeakerMute(bool enable)
SpeakerMuteIsAvailable(available);
if (!available)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " it is not possible to mute the speaker");
+ LOG(LS_WARNING) << "it is not possible to mute the speaker";
return -1;
}
@@ -663,9 +606,8 @@ int32_t AudioMixerManagerLinuxALSA::SetSpeakerMute(bool enable)
!enable);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting playback switch: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error setting playback switch: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -677,8 +619,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerMute(bool& enabled) const
if (_outputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer exists");
+ LOG(LS_WARNING) << "no avaliable output mixer exists";
return -1;
}
@@ -687,8 +628,7 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerMute(bool& enabled) const
LATE(snd_mixer_selem_has_playback_switch)(_outputMixerElement);
if (!available)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " it is not possible to mute the speaker");
+ LOG(LS_WARNING) << "it is not possible to mute the speaker";
return -1;
}
@@ -703,9 +643,8 @@ int32_t AudioMixerManagerLinuxALSA::SpeakerMute(bool& enabled) const
&value);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting playback switch: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting playback switch: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -720,8 +659,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneMuteIsAvailable(
{
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -731,16 +669,14 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneMuteIsAvailable(
int32_t AudioMixerManagerLinuxALSA::SetMicrophoneMute(bool enable)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::SetMicrophoneMute(enable=%u)",
- enable);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetMicrophoneMute(enable="
+ << enable << ")";
rtc::CritScope lock(&_critSect);
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -749,8 +685,7 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneMute(bool enable)
MicrophoneMuteIsAvailable(available);
if (!available)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " it is not possible to mute the microphone");
+ LOG(LS_WARNING) << "it is not possible to mute the microphone";
return -1;
}
@@ -760,9 +695,8 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneMute(bool enable)
!enable);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting capture switch: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error setting capture switch: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -774,8 +708,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneMute(bool& enabled) const
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer exists");
+ LOG(LS_WARNING) << "no avaliable input mixer exists";
return -1;
}
@@ -784,8 +717,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneMute(bool& enabled) const
LATE(snd_mixer_selem_has_capture_switch)(_inputMixerElement);
if (!available)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " it is not possible to mute the microphone");
+ LOG(LS_WARNING) << "it is not possible to mute the microphone";
return -1;
}
@@ -800,9 +732,8 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneMute(bool& enabled) const
&value);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting capture switch: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting capture switch: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -817,8 +748,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneBoostIsAvailable(
{
if (_inputMixerHandle == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer exists");
+ LOG(LS_WARNING) << "no avaliable input mixer exists";
return -1;
}
@@ -830,16 +760,14 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneBoostIsAvailable(
int32_t AudioMixerManagerLinuxALSA::SetMicrophoneBoost(bool enable)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::SetMicrophoneBoost(enable=%u)",
- enable);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetMicrophoneBoost(enable="
+ << enable << ")";
rtc::CritScope lock(&_critSect);
if (_inputMixerHandle == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer exists");
+ LOG(LS_WARNING) << "no avaliable input mixer exists";
return -1;
}
@@ -848,8 +776,7 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneBoost(bool enable)
MicrophoneMuteIsAvailable(available);
if (!available)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " it is not possible to enable microphone boost");
+ LOG(LS_WARNING) << "it is not possible to enable microphone boost";
return -1;
}
@@ -863,8 +790,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneBoost(bool& enabled) const
if (_inputMixerHandle == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer exists");
+ LOG(LS_WARNING) << "no avaliable input mixer exists";
return -1;
}
@@ -879,8 +805,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneVolumeIsAvailable(
{
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -892,16 +817,14 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneVolumeIsAvailable(
int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
uint32_t volume)
{
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "AudioMixerManagerLinuxALSA::SetMicrophoneVolume(volume=%u)",
- volume);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetMicrophoneVolume(volume="
+ << volume << ")";
rtc::CritScope lock(&_critSect);
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -911,9 +834,8 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
volume);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error changing microphone volume: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error changing microphone volume: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
@@ -933,8 +855,7 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -945,19 +866,19 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
&minVol, &maxVol);
if ((maxVol <= minVol) || (errVal != 0))
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " Error getting capture volume range: %s", snd_strerror(errVal));
+ LOG(LS_WARNING) << "Error getting capture volume range: "
+ << snd_strerror(errVal);
}
maxVol = (long int)maxVolume;
printf("min %d max %d", minVol, maxVol);
errVal = snd_mixer_selem_set_capture_volume_range(_inputMixerElement, minVol, maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Capture hardware volume range, min: %d, max: %d", minVol, maxVol);
+ LOG(LS_VERBOSE) << "Capture hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (errVal != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting capture volume range: %s", snd_strerror(errVal));
+ LOG(LS_ERROR) << "Error setting capture volume range: "
+ << snd_strerror(errVal);
return -1;
}
@@ -974,8 +895,7 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable output mixer element exists");
+ LOG(LS_WARNING) << "no avaliable output mixer element exists";
return -1;
}
@@ -987,20 +907,20 @@ int32_t AudioMixerManagerLinuxALSA::SetMicrophoneVolume(
if (maxVol <= minVol)
{
//maxVol = 255;
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " Error getting capture volume range: %s", snd_strerror(errVal));
+ LOG(LS_WARNING) << "Error getting capture volume range: "
+ << snd_strerror(errVal);
}
printf("min %d max %d", minVol, maxVol);
minVol = (long int)minVolume;
errVal = snd_mixer_selem_set_capture_volume_range(
_inputMixerElement, minVol, maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Capture hardware volume range, min: %d, max: %d", minVol, maxVol);
+ LOG(LS_VERBOSE) << "Capture hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (errVal != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error setting capture volume range: %s", snd_strerror(errVal));
+ LOG(LS_ERROR) << "Error setting capture volume range: "
+ << snd_strerror(errVal);
return -1;
}
@@ -1014,8 +934,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneVolume(
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -1029,14 +948,12 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneVolume(
&vol);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Error getting inputvolume: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting inputvolume: "
+ << LATE(snd_strerror)(errVal);
return -1;
}
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " AudioMixerManagerLinuxALSA::MicrophoneVolume() => vol=%i",
- vol);
+ LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::MicrophoneVolume() => vol="
+ << vol;
volume = static_cast<uint32_t> (vol);
@@ -1049,8 +966,7 @@ int32_t AudioMixerManagerLinuxALSA::MaxMicrophoneVolume(
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -1060,8 +976,7 @@ int32_t AudioMixerManagerLinuxALSA::MaxMicrophoneVolume(
// check if we have mic volume at all
if (!LATE(snd_mixer_selem_has_capture_volume)(_inputMixerElement))
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " No microphone volume available");
+ LOG(LS_ERROR) << "No microphone volume available";
return -1;
}
@@ -1069,14 +984,12 @@ int32_t AudioMixerManagerLinuxALSA::MaxMicrophoneVolume(
LATE(snd_mixer_selem_get_capture_volume_range)(_inputMixerElement,
&minVol, &maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Microphone hardware volume range, min: %d, max: %d",
- minVol, maxVol);
+ LOG(LS_VERBOSE) << "Microphone hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (maxVol <= minVol)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting microphone volume range: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting microphone volume range: "
+ << LATE(snd_strerror)(errVal);
}
maxVolume = static_cast<uint32_t> (maxVol);
@@ -1090,8 +1003,7 @@ int32_t AudioMixerManagerLinuxALSA::MinMicrophoneVolume(
if (_inputMixerElement == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer element exists");
+ LOG(LS_WARNING) << "no avaliable input mixer element exists";
return -1;
}
@@ -1102,14 +1014,12 @@ int32_t AudioMixerManagerLinuxALSA::MinMicrophoneVolume(
LATE(snd_mixer_selem_get_capture_volume_range)(_inputMixerElement,
&minVol, &maxVol);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Microphone hardware volume range, min: %d, max: %d",
- minVol, maxVol);
+ LOG(LS_VERBOSE) << "Microphone hardware volume range, min: " << minVol
+ << ", max: " << maxVol;
if (maxVol <= minVol)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " Error getting microphone volume range: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "Error getting microphone volume range: "
+ << LATE(snd_strerror)(errVal);
}
minVolume = static_cast<uint32_t> (minVol);
@@ -1123,8 +1033,7 @@ int32_t AudioMixerManagerLinuxALSA::MicrophoneVolumeStepSize(
if (_inputMixerHandle == NULL)
{
- WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
- " no avaliable input mixer exists");
+ LOG(LS_WARNING) << "no avaliable input mixer exists";
return -1;
}
@@ -1143,9 +1052,8 @@ int32_t AudioMixerManagerLinuxALSA::LoadMicMixerElement() const
int errVal = LATE(snd_mixer_load)(_inputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "snd_mixer_load(_inputMixerHandle), error: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "snd_mixer_load(_inputMixerHandle), error: "
+ << LATE(snd_strerror)(errVal);
_inputMixerHandle = NULL;
return -1;
}
@@ -1165,13 +1073,11 @@ int32_t AudioMixerManagerLinuxALSA::LoadMicMixerElement() const
if (strcmp(selemName, "Capture") == 0) // "Capture", "Mic"
{
_inputMixerElement = elem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice,
- _id, " Capture element set");
+ LOG(LS_VERBOSE) << "Capture element set";
} else if (strcmp(selemName, "Mic") == 0)
{
micElem = elem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice,
- _id, " Mic element found");
+ LOG(LS_VERBOSE) << "Mic element found";
}
}
@@ -1189,13 +1095,11 @@ int32_t AudioMixerManagerLinuxALSA::LoadMicMixerElement() const
if (micElem != NULL)
{
_inputMixerElement = micElem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Using Mic as capture volume.");
+ LOG(LS_VERBOSE) << "Using Mic as capture volume.";
} else
{
_inputMixerElement = NULL;
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Could not find capture volume on the mixer.");
+ LOG(LS_ERROR) << "Could not find capture volume on the mixer.";
return -1;
}
@@ -1209,9 +1113,8 @@ int32_t AudioMixerManagerLinuxALSA::LoadSpeakerMixerElement() const
int errVal = LATE(snd_mixer_load)(_outputMixerHandle);
if (errVal < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- " snd_mixer_load(_outputMixerHandle), error: %s",
- LATE(snd_strerror)(errVal));
+ LOG(LS_ERROR) << "snd_mixer_load(_outputMixerHandle), error: "
+ << LATE(snd_strerror)(errVal);
_outputMixerHandle = NULL;
return -1;
}
@@ -1229,26 +1132,22 @@ int32_t AudioMixerManagerLinuxALSA::LoadSpeakerMixerElement() const
if (LATE(snd_mixer_selem_is_active)(elem))
{
selemName = LATE(snd_mixer_selem_get_name)(elem);
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- "snd_mixer_selem_get_name %d: %s =%x", mixerIdx,
- selemName, elem);
+ LOG(LS_VERBOSE) << "snd_mixer_selem_get_name " << mixerIdx << ": "
+ << selemName << " =" << elem;
// "Master", "PCM", "Wave", "Master Mono", "PC Speaker", "PCM", "Wave"
if (strcmp(selemName, "PCM") == 0)
{
_outputMixerElement = elem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice,
- _id, " PCM element set");
+ LOG(LS_VERBOSE) << "PCM element set";
} else if (strcmp(selemName, "Master") == 0)
{
masterElem = elem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice,
- _id, " Master element found");
+ LOG(LS_VERBOSE) << "Master element found";
} else if (strcmp(selemName, "Speaker") == 0)
{
speakerElem = elem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice,
- _id, " Speaker element found");
+ LOG(LS_VERBOSE) << "Speaker element found";
}
}
@@ -1265,18 +1164,15 @@ int32_t AudioMixerManagerLinuxALSA::LoadSpeakerMixerElement() const
if (masterElem != NULL)
{
_outputMixerElement = masterElem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Using Master as output volume.");
+ LOG(LS_VERBOSE) << "Using Master as output volume.";
} else if (speakerElem != NULL)
{
_outputMixerElement = speakerElem;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id,
- " Using Speaker as output volume.");
+ LOG(LS_VERBOSE) << "Using Speaker as output volume.";
} else
{
_outputMixerElement = NULL;
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
- "Could not find output volume in the mixer.");
+ LOG(LS_ERROR) << "Could not find output volume in the mixer.";
return -1;
}
}

Powered by Google App Engine
This is Rietveld 408576698