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

Side by Side Diff: media/base/audio_latency.h

Issue 2908073002: Make OS audio buffer size limits visible. (Closed)
Patch Set: Move all buffer size calculations to AudioLatency. Created 3 years, 6 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_AUDIO_LATENCY_H_ 5 #ifndef MEDIA_BASE_AUDIO_LATENCY_H_
6 #define MEDIA_BASE_AUDIO_LATENCY_H_ 6 #define MEDIA_BASE_AUDIO_LATENCY_H_
7 7
8 #include "media/base/media_export.h" 8 #include "media/base/media_export.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 25 matching lines...) Expand all
36 int preferred_buffer_size); 36 int preferred_buffer_size);
37 37
38 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred. 38 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred.
39 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size); 39 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size);
40 40
41 static int GetInteractiveBufferSize(int hardware_buffer_size); 41 static int GetInteractiveBufferSize(int hardware_buffer_size);
42 42
43 static int GetExactBufferSize(base::TimeDelta duration, 43 static int GetExactBufferSize(base::TimeDelta duration,
44 int sample_rate, 44 int sample_rate,
45 int hardware_buffer_size); 45 int hardware_buffer_size);
46
47 static int GetMinimumAudioBufferSize(int sample_rate);
48 static int GetMaximumAudioBufferSize(int sample_rate);
49 static int GetDefaultAudioBufferSize(bool is_input, int sample_rate);
46 }; 50 };
47 51
48 } // namespace media 52 } // namespace media
49 53
50 #endif // MEDIA_BASE_AUDIO_LATENCY_H_ 54 #endif // MEDIA_BASE_AUDIO_LATENCY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698