Remove all use of AudioFrame::energy_ from AudioCodingModule

Since r6117, the energy is always calculated in the mixer module,
regardless of the value that ACM sets for energy_.

This part of the the aftermath of issue 3255.

BUG=3255
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6140 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2014-05-14 09:06:52 +00:00
parent 06c1d6f3a1
commit 5c49c64de5
3 changed files with 0 additions and 7 deletions

View File

@ -793,7 +793,6 @@ bool AcmReceiver::GetSilence(int desired_sample_rate_hz, AudioFrame* frame) {
frame->samples_per_channel_ = frame->sample_rate_hz_ / 100; // Always 10 ms.
frame->speech_type_ = AudioFrame::kCNG;
frame->vad_activity_ = AudioFrame::kVadPassive;
frame->energy_ = 0;
int samples = frame->samples_per_channel_ * frame->num_channels_;
memset(frame->data_, 0, samples * sizeof(int16_t));
return true;

View File

@ -1710,9 +1710,6 @@ int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz,
}
audio_frame->id_ = id_;
// The energy must be -1 in order to have the energy calculated later on in
// the AudioConferenceMixer module.
audio_frame->energy_ = static_cast<uint32_t>(-1);
audio_frame->timestamp_ = 0;
return 0;
}

View File

@ -173,9 +173,6 @@ TEST_F(AudioCodingModuleTest, VerifyOutputFrame) {
AudioFrame audio_frame;
const int kSampleRateHz = 32000;
EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame));
// The energy must be -1 in order to have the energy calculated later on in
// the AudioConferenceMixer module.
EXPECT_EQ(static_cast<uint32_t>(-1), audio_frame.energy_);
EXPECT_EQ(id_, audio_frame.id_);
EXPECT_EQ(0u, audio_frame.timestamp_);
EXPECT_GT(audio_frame.num_channels_, 0);