Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: webrtc/modules/audio_coding/acm2/rent_a_codec.cc

Issue 2020353003: AudioDecoderIsacT: Require caller to always specify sample rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/acm2/rent_a_codec.cc
diff --git a/webrtc/modules/audio_coding/acm2/rent_a_codec.cc b/webrtc/modules/audio_coding/acm2/rent_a_codec.cc
index a61f15949d7dc4102b623a5ac2bf3cc619b9b353..e7aebcd14b79ee8a3bda9184e17b97ce4d7f219e 100644
--- a/webrtc/modules/audio_coding/acm2/rent_a_codec.cc
+++ b/webrtc/modules/audio_coding/acm2/rent_a_codec.cc
@@ -279,11 +279,14 @@ std::unique_ptr<AudioEncoder> CreateCngEncoder(
}
std::unique_ptr<AudioDecoder> CreateIsacDecoder(
+ int sample_rate_hz,
const rtc::scoped_refptr<LockedIsacBandwidthInfo>& bwinfo) {
#if defined(WEBRTC_CODEC_ISACFX)
- return std::unique_ptr<AudioDecoder>(new AudioDecoderIsacFix(bwinfo));
+ return std::unique_ptr<AudioDecoder>(
+ new AudioDecoderIsacFix(sample_rate_hz, bwinfo));
#elif defined(WEBRTC_CODEC_ISAC)
- return std::unique_ptr<AudioDecoder>(new AudioDecoderIsac(bwinfo));
+ return std::unique_ptr<AudioDecoder>(
+ new AudioDecoderIsac(sample_rate_hz, bwinfo));
#else
FATAL() << "iSAC is not supported.";
return std::unique_ptr<AudioDecoder>();
@@ -357,8 +360,8 @@ std::unique_ptr<AudioEncoder> RentACodec::RentEncoderStack(
return encoder_stack;
}
-std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder() {
- return CreateIsacDecoder(isac_bandwidth_info_);
+std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder(int sample_rate_hz) {
+ return CreateIsacDecoder(sample_rate_hz, isac_bandwidth_info_);
}
} // namespace acm2

Powered by Google App Engine
This is Rietveld 408576698