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

Unified Diff: modules/audio_device/linux/audio_device_pulse_linux.cc

Issue 3020493002: Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
Patch Set: linux build error Created 3 years, 3 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: modules/audio_device/linux/audio_device_pulse_linux.cc
diff --git a/modules/audio_device/linux/audio_device_pulse_linux.cc b/modules/audio_device/linux/audio_device_pulse_linux.cc
index ecbe63b97a8a591564a0df5e497bcd35331173da..9b16c696a7e98d4e380e76557d09a970052b8144 100644
--- a/modules/audio_device/linux/audio_device_pulse_linux.cc
+++ b/modules/audio_device/linux/audio_device_pulse_linux.cc
@@ -54,10 +54,6 @@ AudioDeviceLinuxPulse::AudioDeviceLinuxPulse()
_sndCardPlayDelay(0),
_sndCardRecDelay(0),
_writeErrors(0),
- _playWarning(0),
- _playError(0),
- _recWarning(0),
- _recError(0),
_deviceIndex(-1),
_numPlayDevices(0),
_numRecDevices(0),
@@ -160,11 +156,6 @@ AudioDeviceGeneric::InitStatus AudioDeviceLinuxPulse::Init() {
return InitStatus::OTHER_ERROR;
}
- _playWarning = 0;
- _playError = 0;
- _recWarning = 0;
- _recError = 0;
-
// Get X display handle for typing detection
_XDisplay = XOpenDisplay(NULL);
if (!_XDisplay) {
@@ -1292,46 +1283,6 @@ bool AudioDeviceLinuxPulse::Playing() const {
return (_playing);
}
-bool AudioDeviceLinuxPulse::PlayoutWarning() const {
- rtc::CritScope lock(&_critSect);
- return (_playWarning > 0);
-}
-
-bool AudioDeviceLinuxPulse::PlayoutError() const {
- rtc::CritScope lock(&_critSect);
- return (_playError > 0);
-}
-
-bool AudioDeviceLinuxPulse::RecordingWarning() const {
- rtc::CritScope lock(&_critSect);
- return (_recWarning > 0);
-}
-
-bool AudioDeviceLinuxPulse::RecordingError() const {
- rtc::CritScope lock(&_critSect);
- return (_recError > 0);
-}
-
-void AudioDeviceLinuxPulse::ClearPlayoutWarning() {
- rtc::CritScope lock(&_critSect);
- _playWarning = 0;
-}
-
-void AudioDeviceLinuxPulse::ClearPlayoutError() {
- rtc::CritScope lock(&_critSect);
- _playError = 0;
-}
-
-void AudioDeviceLinuxPulse::ClearRecordingWarning() {
- rtc::CritScope lock(&_critSect);
- _recWarning = 0;
-}
-
-void AudioDeviceLinuxPulse::ClearRecordingError() {
- rtc::CritScope lock(&_critSect);
- _recError = 0;
-}
-
// ============================================================================
// Private Methods
// ============================================================================
@@ -2191,12 +2142,7 @@ bool AudioDeviceLinuxPulse::PlayThreadProcess() {
NULL, (int64_t)0, PA_SEEK_RELATIVE) != PA_OK) {
_writeErrors++;
if (_writeErrors > 10) {
- if (_playError == 1) {
- LOG(LS_WARNING) << "pending playout error exists";
- }
- // Triggers callback from module process thread.
- _playError = 1;
- LOG(LS_ERROR) << "kPlayoutError message posted: _writeErrors="
+ LOG(LS_ERROR) << "Playout error: _writeErrors="
<< _writeErrors
<< ", error=" << LATE(pa_context_errno)(_paContext);
_writeErrors = 0;
@@ -2240,12 +2186,7 @@ bool AudioDeviceLinuxPulse::PlayThreadProcess() {
NULL, (int64_t)0, PA_SEEK_RELATIVE) != PA_OK) {
_writeErrors++;
if (_writeErrors > 10) {
- if (_playError == 1) {
- LOG(LS_WARNING) << "pending playout error exists";
- }
- // Triggers callback from module process thread.
- _playError = 1;
- LOG(LS_ERROR) << "kPlayoutError message posted: _writeErrors="
+ LOG(LS_ERROR) << "Playout error: _writeErrors="
<< _writeErrors
<< ", error=" << LATE(pa_context_errno)(_paContext);
_writeErrors = 0;
@@ -2358,8 +2299,7 @@ bool AudioDeviceLinuxPulse::RecThreadProcess() {
size_t sampleDataSize;
if (LATE(pa_stream_peek)(_recStream, &sampleData, &sampleDataSize) != 0) {
- _recError = 1; // triggers callback from module process thread
- LOG(LS_ERROR) << "RECORD_ERROR message posted, error = "
+ LOG(LS_ERROR) << "RECORD_ERROR, error = "
<< LATE(pa_context_errno)(_paContext);
break;
}

Powered by Google App Engine
This is Rietveld 408576698