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

Unified Diff: webrtc/modules/audio_device/audio_device_impl.cc

Issue 2169903002: Remove redundant UMA stat reporting. Remove logs that are noisy on Windows. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Undo ignoring StopPlayout and StopRecording Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/audio_device_impl.cc
diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc
index 4fd461cb756d129ea754d2d5a8fea2d072447c97..bfcbb00e48a492bdcffa20b9870411ba3d04ad56 100644
--- a/webrtc/modules/audio_device/audio_device_impl.cc
+++ b/webrtc/modules/audio_device/audio_device_impl.cc
@@ -658,7 +658,6 @@ bool AudioDeviceModuleImpl::MicrophoneIsInitialized() const {
// ----------------------------------------------------------------------------
int32_t AudioDeviceModuleImpl::MaxSpeakerVolume(uint32_t* maxVolume) const {
- LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
uint32_t maxVol(0);
@@ -668,7 +667,6 @@ int32_t AudioDeviceModuleImpl::MaxSpeakerVolume(uint32_t* maxVolume) const {
}
*maxVolume = maxVol;
- LOG(INFO) << "output: " << *maxVolume;
return (0);
}
@@ -677,7 +675,6 @@ int32_t AudioDeviceModuleImpl::MaxSpeakerVolume(uint32_t* maxVolume) const {
// ----------------------------------------------------------------------------
int32_t AudioDeviceModuleImpl::MinSpeakerVolume(uint32_t* minVolume) const {
- LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
uint32_t minVol(0);
@@ -687,7 +684,6 @@ int32_t AudioDeviceModuleImpl::MinSpeakerVolume(uint32_t* minVolume) const {
}
*minVolume = minVol;
- LOG(INFO) << "output: " << *minVolume;
return (0);
}
@@ -1147,7 +1143,6 @@ int32_t AudioDeviceModuleImpl::RecordingIsAvailable(bool* available) {
// ----------------------------------------------------------------------------
int32_t AudioDeviceModuleImpl::MaxMicrophoneVolume(uint32_t* maxVolume) const {
- LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
uint32_t maxVol(0);
@@ -1157,7 +1152,6 @@ int32_t AudioDeviceModuleImpl::MaxMicrophoneVolume(uint32_t* maxVolume) const {
}
*maxVolume = maxVol;
- LOG(INFO) << "output: " << *maxVolume;
return (0);
}
@@ -1166,7 +1160,6 @@ int32_t AudioDeviceModuleImpl::MaxMicrophoneVolume(uint32_t* maxVolume) const {
// ----------------------------------------------------------------------------
int32_t AudioDeviceModuleImpl::MinMicrophoneVolume(uint32_t* minVolume) const {
- LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
uint32_t minVol(0);
@@ -1176,7 +1169,6 @@ int32_t AudioDeviceModuleImpl::MinMicrophoneVolume(uint32_t* minVolume) const {
}
*minVolume = minVol;
- LOG(INFO) << "output: " << *minVolume;
return (0);
}
@@ -1336,6 +1328,9 @@ int32_t AudioDeviceModuleImpl::SetRecordingDevice(WindowsDeviceType device) {
int32_t AudioDeviceModuleImpl::InitPlayout() {
LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
+ if (PlayoutIsInitialized()) {
+ return 0;
+ }
_audioDeviceBuffer.InitPlayout();
int32_t result = _ptrAudioDevice->InitPlayout();
LOG(INFO) << "output: " << result;
@@ -1351,6 +1346,9 @@ int32_t AudioDeviceModuleImpl::InitPlayout() {
int32_t AudioDeviceModuleImpl::InitRecording() {
LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
+ if (RecordingIsInitialized()) {
+ return 0;
+ }
_audioDeviceBuffer.InitRecording();
int32_t result = _ptrAudioDevice->InitRecording();
LOG(INFO) << "output: " << result;
@@ -1386,6 +1384,9 @@ bool AudioDeviceModuleImpl::RecordingIsInitialized() const {
int32_t AudioDeviceModuleImpl::StartPlayout() {
LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
+ if (Playing()) {
+ return 0;
+ }
int32_t result = _ptrAudioDevice->StartPlayout();
LOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartPlayoutSuccess",
@@ -1424,6 +1425,9 @@ bool AudioDeviceModuleImpl::Playing() const {
int32_t AudioDeviceModuleImpl::StartRecording() {
LOG(INFO) << __FUNCTION__;
CHECK_INITIALIZED();
+ if (Recording()) {
+ return 0;
+ }
int32_t result = _ptrAudioDevice->StartRecording();
LOG(INFO) << "output: " << result;
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartRecordingSuccess",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698