Remove the use of AudioFrame::energy_ from AudioProcessing and VoE.

We want to remove energy_ entirely as we've seen that carrying around
this potentially invalid value is dangerous.

Results in the removal of AudioBuffer::is_muted(). This wasn't used in
practice any longer, after the level calculation moved directly to
channel.cc

Instead, now use ProcessMuted() in channel.cc, to shortcut the level
computation when the signal is muted.

BUG=3315
TESTED=Muting the channel in voe_cmd_test results in rms=127.
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6159 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2014-05-14 19:00:59 +00:00
parent 688ed699e0
commit 21299d4e00
9 changed files with 21 additions and 41 deletions

View File

@ -71,8 +71,6 @@ class AudioBuffer {
void set_activity(AudioFrame::VADActivity activity);
AudioFrame::VADActivity activity() const;
bool is_muted() const;
// Use for int16 interleaved data.
void DeinterleaveFrom(AudioFrame* audioFrame);
void InterleaveTo(AudioFrame* audioFrame) const;
@ -106,7 +104,6 @@ class AudioBuffer {
int num_mixed_low_pass_channels_;
bool reference_copied_;
AudioFrame::VADActivity activity_;
bool is_muted_;
// If non-null, use this instead of channels_->channel(0). This is an
// optimization for the case num_proc_channels_ == 1 that allows us to point