Revert 7623 "Remove the state_ member from AudioDecoder"
Breaks Chrome compile: e:\b\build\slave\win_builder\build\src\third_party\webrtc\modules\audio_coding\neteq\neteq_impl.cc(131) : error C3867: 'webrtc::NetEqImpl::InsertPacketInternal': function call missing argument list; use '&webrtc::NetEqImpl::InsertPacketInternal' to create a pointer to member e:\b\build\slave\win_builder\build\src\third_party\webrtc\modules\audio_coding\neteq\neteq_impl.cc(131) : error C3861: 'LOG_FERR1': identifier not found e:\b\build\slave\win_builder\build\src\third_party\webrtc\modules\audio_coding\neteq\neteq_impl.cc(152) : error C3867: 'webrtc::NetEqImpl::InsertPacketInternal': function call missing argument list; use '&webrtc::NetEqImpl::InsertPacketInternal' to create a pointer to member e:\b\build\slave\win_builder\build\src\third_party\webrtc\modules\audio_coding\neteq\neteq_impl.cc(152) : error C3861: 'LOG_FERR1': identifier not found e:\b\build\slave\win_builder\build\src\third_party\webrtc\modules\audio_coding\neteq\neteq_impl.cc(169) : error C3867: 'webrtc::NetEqImpl::GetAudioInternal': function call missing argument list; use '&webrtc::NetEqImpl::GetAudioInternal' to create a pointer to member ... > Remove the state_ member from AudioDecoder > > The subclasses that need a state pointer should declare them---with > the right type, not void*, to get rid of all those casts. > > Two small but not quite trivial cleanups are included because they > blocked the state_ removal: > > - AudioDecoderG722Stereo now inherits directly from AudioDecoder > instead of being a subclass of AudioDecoderG722. > > - AudioDecoder now has a CngDecoderInstance member function, which > is implemented only by AudioDecoderCng. This replaces the previous > practice of calling AudioDecoder::state() and casting the result > to a CNG_dec_inst*. It still isn't pretty, but now the blemish is > plainly visible in the AudioDecoder class declaration. > > R=henrik.lundin@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/24169005 TBR=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/30879005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7629 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -147,9 +147,9 @@ int Normal::Process(const int16_t* input,
|
||||
AudioDecoder* cng_decoder = decoder_database_->GetActiveCngDecoder();
|
||||
|
||||
if (cng_decoder) {
|
||||
CNG_dec_inst* cng_inst = static_cast<CNG_dec_inst*>(cng_decoder->state());
|
||||
// Generate long enough for 32kHz.
|
||||
if (WebRtcCng_Generate(cng_decoder->CngDecoderInstance(), cng_output,
|
||||
kCngLength, 0) < 0) {
|
||||
if (WebRtcCng_Generate(cng_inst, cng_output, kCngLength, 0) < 0) {
|
||||
// Error returned; set return vector to all zeros.
|
||||
memset(cng_output, 0, sizeof(cng_output));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user