Index: webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc |
diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc |
index 3bbc1859d8dfd477cb333e052b593184fac737c7..7bb7347a20eca518093a45d466350491e3124f93 100644 |
--- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc |
+++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc |
@@ -106,7 +106,7 @@ AudioDeviceLinuxPulse::~AudioDeviceLinuxPulse() |
{ |
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id, |
"%s destroyed", __FUNCTION__); |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
Terminate(); |
if (_recBuffer) |
@@ -139,7 +139,7 @@ AudioDeviceLinuxPulse::~AudioDeviceLinuxPulse() |
void AudioDeviceLinuxPulse::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
_ptrAudioBuffer = audioBuffer; |
@@ -165,7 +165,7 @@ int32_t AudioDeviceLinuxPulse::ActiveAudioLayer( |
int32_t AudioDeviceLinuxPulse::Init() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_initialized) |
{ |
return 0; |
@@ -235,7 +235,7 @@ int32_t AudioDeviceLinuxPulse::Init() |
int32_t AudioDeviceLinuxPulse::Terminate() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (!_initialized) |
{ |
return 0; |
@@ -286,13 +286,13 @@ int32_t AudioDeviceLinuxPulse::Terminate() |
bool AudioDeviceLinuxPulse::Initialized() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_initialized); |
} |
int32_t AudioDeviceLinuxPulse::InitSpeaker() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_playing) |
{ |
@@ -336,7 +336,7 @@ int32_t AudioDeviceLinuxPulse::InitSpeaker() |
int32_t AudioDeviceLinuxPulse::InitMicrophone() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_recording) |
{ |
return -1; |
@@ -379,19 +379,19 @@ int32_t AudioDeviceLinuxPulse::InitMicrophone() |
bool AudioDeviceLinuxPulse::SpeakerIsInitialized() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_mixerManager.SpeakerIsInitialized()); |
} |
bool AudioDeviceLinuxPulse::MicrophoneIsInitialized() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_mixerManager.MicrophoneIsInitialized()); |
} |
int32_t AudioDeviceLinuxPulse::SpeakerVolumeIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool wasInitialized = _mixerManager.SpeakerIsInitialized(); |
// Make an attempt to open up the |
@@ -418,7 +418,7 @@ int32_t AudioDeviceLinuxPulse::SpeakerVolumeIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetSpeakerVolume(uint32_t volume) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (!_playing) { |
// Only update the volume if it's been set while we weren't playing. |
update_speaker_volume_at_startup_ = true; |
@@ -428,7 +428,7 @@ int32_t AudioDeviceLinuxPulse::SetSpeakerVolume(uint32_t volume) |
int32_t AudioDeviceLinuxPulse::SpeakerVolume(uint32_t& volume) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
uint32_t level(0); |
if (_mixerManager.SpeakerVolume(level) == -1) |
@@ -464,7 +464,7 @@ int32_t AudioDeviceLinuxPulse::WaveOutVolume( |
int32_t AudioDeviceLinuxPulse::MaxSpeakerVolume( |
uint32_t& maxVolume) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
uint32_t maxVol(0); |
if (_mixerManager.MaxSpeakerVolume(maxVol) == -1) |
@@ -480,7 +480,7 @@ int32_t AudioDeviceLinuxPulse::MaxSpeakerVolume( |
int32_t AudioDeviceLinuxPulse::MinSpeakerVolume( |
uint32_t& minVolume) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
uint32_t minVol(0); |
if (_mixerManager.MinSpeakerVolume(minVol) == -1) |
@@ -496,7 +496,7 @@ int32_t AudioDeviceLinuxPulse::MinSpeakerVolume( |
int32_t AudioDeviceLinuxPulse::SpeakerVolumeStepSize( |
uint16_t& stepSize) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
uint16_t delta(0); |
if (_mixerManager.SpeakerVolumeStepSize(delta) == -1) |
@@ -511,7 +511,7 @@ int32_t AudioDeviceLinuxPulse::SpeakerVolumeStepSize( |
int32_t AudioDeviceLinuxPulse::SpeakerMuteIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool isAvailable(false); |
bool wasInitialized = _mixerManager.SpeakerIsInitialized(); |
@@ -543,13 +543,13 @@ int32_t AudioDeviceLinuxPulse::SpeakerMuteIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetSpeakerMute(bool enable) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_mixerManager.SetSpeakerMute(enable)); |
} |
int32_t AudioDeviceLinuxPulse::SpeakerMute(bool& enabled) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool muted(0); |
if (_mixerManager.SpeakerMute(muted) == -1) |
{ |
@@ -562,7 +562,7 @@ int32_t AudioDeviceLinuxPulse::SpeakerMute(bool& enabled) const |
int32_t AudioDeviceLinuxPulse::MicrophoneMuteIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool isAvailable(false); |
bool wasInitialized = _mixerManager.MicrophoneIsInitialized(); |
@@ -595,13 +595,13 @@ int32_t AudioDeviceLinuxPulse::MicrophoneMuteIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetMicrophoneMute(bool enable) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_mixerManager.SetMicrophoneMute(enable)); |
} |
int32_t AudioDeviceLinuxPulse::MicrophoneMute(bool& enabled) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool muted(0); |
if (_mixerManager.MicrophoneMute(muted) == -1) |
{ |
@@ -614,7 +614,7 @@ int32_t AudioDeviceLinuxPulse::MicrophoneMute(bool& enabled) const |
int32_t AudioDeviceLinuxPulse::MicrophoneBoostIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool isAvailable(false); |
bool wasInitialized = _mixerManager.MicrophoneIsInitialized(); |
@@ -645,13 +645,13 @@ int32_t AudioDeviceLinuxPulse::MicrophoneBoostIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetMicrophoneBoost(bool enable) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_mixerManager.SetMicrophoneBoost(enable)); |
} |
int32_t AudioDeviceLinuxPulse::MicrophoneBoost(bool& enabled) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool onOff(0); |
if (_mixerManager.MicrophoneBoost(onOff) == -1) |
@@ -666,7 +666,7 @@ int32_t AudioDeviceLinuxPulse::MicrophoneBoost(bool& enabled) const |
int32_t AudioDeviceLinuxPulse::StereoRecordingIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_recChannels == 2 && _recording) { |
available = true; |
return 0; |
@@ -700,7 +700,7 @@ int32_t AudioDeviceLinuxPulse::StereoRecordingIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetStereoRecording(bool enable) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (enable) |
_recChannels = 2; |
else |
@@ -711,7 +711,7 @@ int32_t AudioDeviceLinuxPulse::SetStereoRecording(bool enable) |
int32_t AudioDeviceLinuxPulse::StereoRecording(bool& enabled) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_recChannels == 2) |
enabled = true; |
else |
@@ -722,7 +722,7 @@ int32_t AudioDeviceLinuxPulse::StereoRecording(bool& enabled) const |
int32_t AudioDeviceLinuxPulse::StereoPlayoutIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_playChannels == 2 && _playing) { |
available = true; |
return 0; |
@@ -755,7 +755,7 @@ int32_t AudioDeviceLinuxPulse::StereoPlayoutIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::SetStereoPlayout(bool enable) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (enable) |
_playChannels = 2; |
else |
@@ -766,7 +766,7 @@ int32_t AudioDeviceLinuxPulse::SetStereoPlayout(bool enable) |
int32_t AudioDeviceLinuxPulse::StereoPlayout(bool& enabled) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_playChannels == 2) |
enabled = true; |
else |
@@ -792,7 +792,7 @@ bool AudioDeviceLinuxPulse::AGC() const |
int32_t AudioDeviceLinuxPulse::MicrophoneVolumeIsAvailable( |
bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
bool wasInitialized = _mixerManager.MicrophoneIsInitialized(); |
// Make an attempt to open up the |
@@ -876,7 +876,7 @@ int32_t AudioDeviceLinuxPulse::MinMicrophoneVolume( |
int32_t AudioDeviceLinuxPulse::MicrophoneVolumeStepSize( |
uint16_t& stepSize) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
uint16_t delta(0); |
if (_mixerManager.MicrophoneVolumeStepSize(delta) == -1) |
@@ -910,7 +910,7 @@ int16_t AudioDeviceLinuxPulse::PlayoutDevices() |
int32_t AudioDeviceLinuxPulse::SetPlayoutDevice(uint16_t index) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_playIsInitialized) |
{ |
return -1; |
@@ -947,7 +947,7 @@ int32_t AudioDeviceLinuxPulse::PlayoutDeviceName( |
char name[kAdmMaxDeviceNameSize], |
char guid[kAdmMaxGuidSize]) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
const uint16_t nDevices = PlayoutDevices(); |
if ((index > (nDevices - 1)) || (name == NULL)) |
@@ -989,7 +989,7 @@ int32_t AudioDeviceLinuxPulse::RecordingDeviceName( |
char name[kAdmMaxDeviceNameSize], |
char guid[kAdmMaxGuidSize]) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
const uint16_t nDevices(RecordingDevices()); |
if ((index > (nDevices - 1)) || (name == NULL)) |
@@ -1047,7 +1047,7 @@ int16_t AudioDeviceLinuxPulse::RecordingDevices() |
int32_t AudioDeviceLinuxPulse::SetRecordingDevice(uint16_t index) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_recIsInitialized) |
{ |
return -1; |
@@ -1081,7 +1081,7 @@ int32_t AudioDeviceLinuxPulse::SetRecordingDevice( |
int32_t AudioDeviceLinuxPulse::PlayoutIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
available = false; |
// Try to initialize the playout side |
@@ -1100,7 +1100,7 @@ int32_t AudioDeviceLinuxPulse::PlayoutIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::RecordingIsAvailable(bool& available) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
available = false; |
// Try to initialize the playout side |
@@ -1119,7 +1119,7 @@ int32_t AudioDeviceLinuxPulse::RecordingIsAvailable(bool& available) |
int32_t AudioDeviceLinuxPulse::InitPlayout() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_playing) |
{ |
@@ -1241,7 +1241,7 @@ int32_t AudioDeviceLinuxPulse::InitPlayout() |
int32_t AudioDeviceLinuxPulse::InitRecording() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (_recording) |
{ |
@@ -1353,7 +1353,7 @@ int32_t AudioDeviceLinuxPulse::InitRecording() |
int32_t AudioDeviceLinuxPulse::StartRecording() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (!_recIsInitialized) |
{ |
return -1; |
@@ -1400,7 +1400,7 @@ int32_t AudioDeviceLinuxPulse::StartRecording() |
int32_t AudioDeviceLinuxPulse::StopRecording() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
CriticalSectionScoped lock(&_critSect); |
if (!_recIsInitialized) |
@@ -1463,25 +1463,25 @@ int32_t AudioDeviceLinuxPulse::StopRecording() |
bool AudioDeviceLinuxPulse::RecordingIsInitialized() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_recIsInitialized); |
} |
bool AudioDeviceLinuxPulse::Recording() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_recording); |
} |
bool AudioDeviceLinuxPulse::PlayoutIsInitialized() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_playIsInitialized); |
} |
int32_t AudioDeviceLinuxPulse::StartPlayout() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (!_playIsInitialized) |
{ |
@@ -1535,7 +1535,7 @@ int32_t AudioDeviceLinuxPulse::StartPlayout() |
int32_t AudioDeviceLinuxPulse::StopPlayout() |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
CriticalSectionScoped lock(&_critSect); |
if (!_playIsInitialized) |
@@ -1607,14 +1607,14 @@ int32_t AudioDeviceLinuxPulse::PlayoutDelay(uint16_t& delayMS) const |
int32_t AudioDeviceLinuxPulse::RecordingDelay(uint16_t& delayMS) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
delayMS = (uint16_t) _sndCardRecDelay; |
return 0; |
} |
bool AudioDeviceLinuxPulse::Playing() const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
return (_playing); |
} |
@@ -1622,7 +1622,7 @@ int32_t AudioDeviceLinuxPulse::SetPlayoutBuffer( |
const AudioDeviceModule::BufferType type, |
uint16_t sizeMS) |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
if (type != AudioDeviceModule::kFixedBufferSize) |
{ |
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id, |
@@ -1640,7 +1640,7 @@ int32_t AudioDeviceLinuxPulse::PlayoutBuffer( |
AudioDeviceModule::BufferType& type, |
uint16_t& sizeMS) const |
{ |
- DCHECK(thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
type = _playBufType; |
sizeMS = _playBufDelayFixed; |