AudioDecoderIsacT: Require caller to always specify sample rate
This gets rid of the complex & icky state where the sample rate is not yet determined. BUG=webrtc:5801 Review-Url: https://codereview.webrtc.org/2020353003 Cr-Commit-Position: refs/heads/master@{#13011}
This commit is contained in:
@ -45,8 +45,9 @@ int32_t AudioCoder::SetEncodeCodec(const CodecInst& codec_inst) {
|
||||
}
|
||||
|
||||
int32_t AudioCoder::SetDecodeCodec(const CodecInst& codec_inst) {
|
||||
if (acm_->RegisterReceiveCodec(
|
||||
codec_inst, [&] { return rent_a_codec_.RentIsacDecoder(); }) == -1) {
|
||||
if (acm_->RegisterReceiveCodec(codec_inst, [&] {
|
||||
return rent_a_codec_.RentIsacDecoder(codec_inst.plfreq);
|
||||
}) == -1) {
|
||||
return -1;
|
||||
}
|
||||
memcpy(&receive_codec_, &codec_inst, sizeof(CodecInst));
|
||||
|
||||
Reference in New Issue
Block a user