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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 1863023002: Gave the ClosestNativeRate method in APM a more proper name (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added external declaration to the delay estimator wrapper Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_impl.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index 0f48fa5e186434a3cda7afd75cc3d2150e3984db..163b33da310c98124bb6e6e9f555db87cbaedb65 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -94,7 +94,7 @@ bool is_multi_band(int sample_rate_hz) {
sample_rate_hz == AudioProcessing::kSampleRate48kHz;
}
-int ClosestNativeRate(int min_proc_rate) {
+int ClosestHigherNativeRate(int min_proc_rate) {
for (int rate : AudioProcessing::kNativeSampleRatesHz) {
if (rate >= min_proc_rate) {
return rate;
@@ -362,9 +362,9 @@ int AudioProcessingImpl::InitializeLocked(const ProcessingConfig& config) {
formats_.api_format = config;
- capture_nonlocked_.fwd_proc_format = StreamConfig(ClosestNativeRate(std::min(
- formats_.api_format.input_stream().sample_rate_hz(),
- formats_.api_format.output_stream().sample_rate_hz())));
+ capture_nonlocked_.fwd_proc_format = StreamConfig(ClosestHigherNativeRate(
+ std::min(formats_.api_format.input_stream().sample_rate_hz(),
+ formats_.api_format.output_stream().sample_rate_hz())));
// We normally process the reverse stream at 16 kHz. Unless...
int rev_proc_rate = kSampleRate16kHz;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698