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

Unified Diff: webrtc/modules/audio_coding/neteq/decoder_database.h

Issue 2337473002: Multi frequency DTMF support - receiver side (Closed)
Patch Set: rebase Created 4 years, 1 month 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/neteq/decoder_database.h
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.h b/webrtc/modules/audio_coding/neteq/decoder_database.h
index 6e172600b7b304bd50fb303709324009887e4109..83789daa919028eccddb6d2734094994d12c5e9a 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.h
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.h
@@ -62,6 +62,10 @@ class DecoderDatabase {
void DropDecoder() const { decoder_.reset(); }
int SampleRateHz() const {
+ if (IsDtmf()) {
+ // DTMF has a 1:1 mapping between clock rate and sample rate.
+ return audio_format_.clockrate_hz;
+ }
const AudioDecoder* decoder = GetDecoder();
RTC_DCHECK_EQ(1, !!decoder + !!cng_decoder_);
return decoder ? decoder->SampleRateHz() : cng_decoder_->sample_rate_hz;
« no previous file with comments | « webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698