AudioDecoder: Replace Init() with Reset()
The Init() method was previously used to initialize and reset decoders, and returned an error code. The new Reset() method is used for reset only; the constructor is now responsible for fully initializing the AudioDecoder. Reset() doesn't return an error code; it turned out that none of the functions it ended up calling could actually fail, so this CL removes their error return codes as well. R=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1319683002 . Cr-Commit-Position: refs/heads/master@{#9798}
This commit is contained in:
@ -111,7 +111,7 @@ void TestGetSetBandwidthInfo(const int16_t* speech_data,
|
||||
typename T::instance_type* encdec;
|
||||
ASSERT_EQ(0, T::Create(&encdec));
|
||||
ASSERT_EQ(0, T::EncoderInit(encdec, adaptive ? 0 : 1));
|
||||
ASSERT_EQ(0, T::DecoderInit(encdec));
|
||||
T::DecoderInit(encdec);
|
||||
ASSERT_EQ(0, T::SetEncSampRate(encdec, sample_rate_hz));
|
||||
if (adaptive)
|
||||
ASSERT_EQ(0, T::ControlBwe(encdec, bit_rate, frame_size_ms, false));
|
||||
@ -129,7 +129,7 @@ void TestGetSetBandwidthInfo(const int16_t* speech_data,
|
||||
ASSERT_EQ(0, T::Control(enc, bit_rate, frame_size_ms));
|
||||
typename T::instance_type* dec;
|
||||
ASSERT_EQ(0, T::Create(&dec));
|
||||
ASSERT_EQ(0, T::DecoderInit(dec));
|
||||
T::DecoderInit(dec);
|
||||
T::SetInitialBweBottleneck(dec, bit_rate);
|
||||
T::SetEncSampRateInDecoder(dec, sample_rate_hz);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user