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

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc

Issue 1467163002: NetEq: Add new method last_output_sample_rate_hz (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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/main/acm2/audio_coding_module_impl.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index d4d5853e7181dceb5afc2c3e8475595177c67ad4..19ae4cbc2b5e6d18e9c22688d6c38dfb177045e5 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -532,17 +532,14 @@ int AudioCodingModuleImpl::ReceiveFrequency() const {
auto codec_id = RentACodec::CodecIdFromIndex(receiver_.last_audio_codec_id());
return codec_id ? RentACodec::CodecInstById(*codec_id)->plfreq
- : receiver_.current_sample_rate_hz();
+ : receiver_.last_output_sample_rate_hz();
}
// Get current playout frequency.
int AudioCodingModuleImpl::PlayoutFrequency() const {
WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_,
"PlayoutFrequency()");
-
- CriticalSectionScoped lock(acm_crit_sect_.get());
-
- return receiver_.current_sample_rate_hz();
+ return receiver_.last_output_sample_rate_hz();
}
// Register possible receive codecs, can be called multiple times,

Powered by Google App Engine
This is Rietveld 408576698