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

Side by Side Diff: media/base/mac/audio_latency_mac.cc

Issue 2973763002: Revert of Make OS audio buffer size limits visible. (Closed)
Patch Set: Created 3 years, 5 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/mac/audio_latency_mac.h"
6 #include "media/base/limits.h"
7
8 namespace media {
9
10 int GetMinAudioBufferSizeMacOS(int min_buffer_size, int sample_rate) {
11 int buffer_size = min_buffer_size;
12 if (sample_rate > 48000) {
13 // The default buffer size is too small for higher sample rates and may lead
14 // to glitching. Adjust upwards by multiples of the default size.
15 if (sample_rate <= 96000)
16 buffer_size = 2 * limits::kMinAudioBufferSize;
17 else if (sample_rate <= 192000)
18 buffer_size = 4 * limits::kMinAudioBufferSize;
19 }
20 return buffer_size;
21 }
22
23 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mac/audio_latency_mac.h ('k') | third_party/WebKit/Source/platform/audio/AudioDestination.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698