diff options
author | kwiberg@webrtc.org <kwiberg@webrtc.org> | 2014-11-04 13:29:24 +0000 |
---|---|---|
committer | kwiberg@webrtc.org <kwiberg@webrtc.org> | 2014-11-04 13:29:24 +0000 |
commit | ab22837337733a450afbb8352c337bd5607c948e (patch) | |
tree | 87882f758b79d3d11f44a88b711b949e027d5ccf | |
parent | 14f28ebb0e988e508784065b4666e6b8ca997321 (diff) | |
download | webrtc-ab22837337733a450afbb8352c337bd5607c948e.tar.gz |
Remove the useless dummy state parameter to WebRtcPcm16b_DecodeW16
R=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/26039004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7610 4adac7df-926f-26a2-2b94-8c16560cd09d
4 files changed, 4 insertions, 9 deletions
diff --git a/modules/audio_coding/codecs/pcm16b/include/pcm16b.h b/modules/audio_coding/codecs/pcm16b/include/pcm16b.h index 9c96b830..86b32fe2 100644 --- a/modules/audio_coding/codecs/pcm16b/include/pcm16b.h +++ b/modules/audio_coding/codecs/pcm16b/include/pcm16b.h @@ -73,8 +73,7 @@ int16_t WebRtcPcm16b_Encode(int16_t *speech16b, * Returned value : Samples in speechOut16b */ -int16_t WebRtcPcm16b_DecodeW16(void *inst, - int16_t *speechIn16b, +int16_t WebRtcPcm16b_DecodeW16(int16_t *speechIn16b, int16_t length_bytes, int16_t *speechOut16b, int16_t* speechType); diff --git a/modules/audio_coding/codecs/pcm16b/pcm16b.c b/modules/audio_coding/codecs/pcm16b/pcm16b.c index af6720f6..2c6bea6a 100644 --- a/modules/audio_coding/codecs/pcm16b/pcm16b.c +++ b/modules/audio_coding/codecs/pcm16b/pcm16b.c @@ -61,8 +61,7 @@ int16_t WebRtcPcm16b_Encode(int16_t *speech16b, /* Decoder with int16_t Input instead of char when the int16_t Encoder is used */ -int16_t WebRtcPcm16b_DecodeW16(void *inst, - int16_t *speechIn16b, +int16_t WebRtcPcm16b_DecodeW16(int16_t *speechIn16b, int16_t length_bytes, int16_t *speechOut16b, int16_t* speechType) @@ -80,9 +79,6 @@ int16_t WebRtcPcm16b_DecodeW16(void *inst, *speechType=1; - // Avoid warning. - (void)(inst = NULL); - return length_bytes >> 1; } diff --git a/modules/audio_coding/neteq/audio_decoder_impl.cc b/modules/audio_coding/neteq/audio_decoder_impl.cc index c3f2f0b1..07b1b4be 100644 --- a/modules/audio_coding/neteq/audio_decoder_impl.cc +++ b/modules/audio_coding/neteq/audio_decoder_impl.cc @@ -82,7 +82,7 @@ int AudioDecoderPcm16B::Decode(const uint8_t* encoded, size_t encoded_len, int16_t* decoded, SpeechType* speech_type) { int16_t temp_type = 1; // Default is speech. int16_t ret = WebRtcPcm16b_DecodeW16( - state_, reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)), + reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)), static_cast<int16_t>(encoded_len), decoded, &temp_type); *speech_type = ConvertSpeechType(temp_type); return ret; diff --git a/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h b/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h index c15fa1ac..400c0b03 100644 --- a/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h +++ b/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h @@ -33,7 +33,7 @@ class ExternalPcm16B : public AudioDecoder { int16_t* decoded, SpeechType* speech_type) { int16_t temp_type; int16_t ret = WebRtcPcm16b_DecodeW16( - state_, reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)), + reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)), static_cast<int16_t>(encoded_len), decoded, &temp_type); *speech_type = ConvertSpeechType(temp_type); return ret; |