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

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

Issue 2750543003: Support AudioContextOptions latencyHint as double. (Closed)
Patch Set: Fixes based on reviewer comments. 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 // 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 media { 10 namespace media {
(...skipping 17 matching lines...) Expand all
28 }; 28 };
29 29
30 // |preferred_buffer_size| should be set to 0 if a client has no preference. 30 // |preferred_buffer_size| should be set to 0 if a client has no preference.
31 static int GetHighLatencyBufferSize(int sample_rate, 31 static int GetHighLatencyBufferSize(int sample_rate,
32 int preferred_buffer_size); 32 int preferred_buffer_size);
33 33
34 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred. 34 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred.
35 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size); 35 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size);
36 36
37 static int GetInteractiveBufferSize(int hardware_buffer_size); 37 static int GetInteractiveBufferSize(int hardware_buffer_size);
38
39 static int GetExactBufferSize(int preferred_buffer_size,
40 int min_buffer_size,
41 int max_buffer_size);
38 }; 42 };
39 43
40 } // namespace media 44 } // namespace media
41 45
42 #endif // MEDIA_BASE_AUDIO_LATENCY_H_ 46 #endif // MEDIA_BASE_AUDIO_LATENCY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698