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:
parent
06c1d6f3a1
commit
5c49c64de5
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user