summaryrefslogtreecommitdiff
path: root/voice_engine/transmit_mixer.cc
diff options
context:
space:
mode:
authorandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-10-04 17:54:09 +0000
committerandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-10-04 17:54:09 +0000
commite06943f2aeb970e7c11070c327ab3b3264e2722f (patch)
tree7aa11eefe700be92f67190b87888617a4f0e5688 /voice_engine/transmit_mixer.cc
parent3124b2ee18a305dd2117137bdbca05de95302ab9 (diff)
downloadwebrtc-e06943f2aeb970e7c11070c327ab3b3264e2722f.tar.gz
Clean up AudioProcessing defaults and errors.
- Remove unneeded #defines and switch the remainder to consts. - All AudioProcessing components are disabled by default, so remove explicit disables. - AudioProcessing uses a rational 16 kHz mono default, so no need to explictly initialize. - Add assert(false) to real-time errors which should not occur. TESTED=trybots R=bjornv@webrtc.org, xians@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2253005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4924 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/transmit_mixer.cc')
-rw-r--r--voice_engine/transmit_mixer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/voice_engine/transmit_mixer.cc b/voice_engine/transmit_mixer.cc
index 5e67e200..743d8e20 100644
--- a/voice_engine/transmit_mixer.cc
+++ b/voice_engine/transmit_mixer.cc
@@ -1319,21 +1319,26 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
int current_mic_level) {
if (audioproc_->set_num_channels(_audioFrame.num_channels_,
_audioFrame.num_channels_) != 0) {
+ assert(false);
LOG_FERR2(LS_ERROR, set_num_channels, _audioFrame.num_channels_,
_audioFrame.num_channels_);
}
if (audioproc_->set_sample_rate_hz(_audioFrame.sample_rate_hz_) != 0) {
+ assert(false);
LOG_FERR1(LS_ERROR, set_sample_rate_hz, _audioFrame.sample_rate_hz_);
}
if (audioproc_->set_stream_delay_ms(delay_ms) != 0) {
- // Report as a warning; we can occasionally run into very large delays.
- LOG_FERR1(LS_WARNING, set_stream_delay_ms, delay_ms);
+ // A redundant warning is reported in AudioDevice, which we've throttled
+ // to avoid flooding the logs. Relegate this one to LS_VERBOSE to avoid
+ // repeating the problem here.
+ LOG_FERR1(LS_VERBOSE, set_stream_delay_ms, delay_ms);
}
GainControl* agc = audioproc_->gain_control();
if (agc->set_stream_analog_level(current_mic_level) != 0) {
+ assert(false);
LOG_FERR1(LS_ERROR, set_stream_analog_level, current_mic_level);
}
@@ -1344,6 +1349,7 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
int err = audioproc_->ProcessStream(&_audioFrame);
if (err != 0) {
+ assert(false);
LOG(LS_ERROR) << "ProcessStream() error: " << err;
}