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

Side by Side Diff: webrtc/modules/audio_mixer/default_output_rate_calculator.cc

Issue 2718953002: Roll chromium_revision 33a7a547b9..0e44c5e141 (452838:453130) (Closed)
Patch Set: Disabling test for iOS Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 13 matching lines...) Expand all
24 using NativeRate = AudioProcessing::NativeRate; 24 using NativeRate = AudioProcessing::NativeRate;
25 const int maximal_frequency = *std::max_element( 25 const int maximal_frequency = *std::max_element(
26 preferred_sample_rates.begin(), preferred_sample_rates.end()); 26 preferred_sample_rates.begin(), preferred_sample_rates.end());
27 27
28 RTC_DCHECK_LE(NativeRate::kSampleRate8kHz, maximal_frequency); 28 RTC_DCHECK_LE(NativeRate::kSampleRate8kHz, maximal_frequency);
29 RTC_DCHECK_GE(NativeRate::kSampleRate48kHz, maximal_frequency); 29 RTC_DCHECK_GE(NativeRate::kSampleRate48kHz, maximal_frequency);
30 30
31 static constexpr NativeRate native_rates[] = { 31 static constexpr NativeRate native_rates[] = {
32 NativeRate::kSampleRate8kHz, NativeRate::kSampleRate16kHz, 32 NativeRate::kSampleRate8kHz, NativeRate::kSampleRate16kHz,
33 NativeRate::kSampleRate32kHz, NativeRate::kSampleRate48kHz}; 33 NativeRate::kSampleRate32kHz, NativeRate::kSampleRate48kHz};
34 const auto rounded_up_index = std::lower_bound( 34 const auto* rounded_up_index = std::lower_bound(
35 std::begin(native_rates), std::end(native_rates), maximal_frequency); 35 std::begin(native_rates), std::end(native_rates), maximal_frequency);
36 RTC_DCHECK(rounded_up_index != std::end(native_rates)); 36 RTC_DCHECK(rounded_up_index != std::end(native_rates));
37 return *rounded_up_index; 37 return *rounded_up_index;
38 } 38 }
39 } // namespace webrtc 39 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/packet_buffer.cc ('k') | webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698