OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_AUDIO_LATENCY_H_ | |
6 #define MEDIA_BASE_AUDIO_LATENCY_H_ | |
7 | |
8 #include "media/base/media_export.h" | |
9 | |
10 namespace media { | |
11 | |
12 class MEDIA_EXPORT AudioLatency { | |
13 public: | |
14 // Categoties of expected latencies for input/output audio. | |
15 enum LatencyType { | |
16 LATENCY_EXACT_MS = 0, | |
chcunningham
2016/06/22 04:34:07
is EXACT planned to be part of the spec? It seems
o1ka
2016/06/23 16:36:16
(The link you gave does not work). Here https://we
chcunningham
2016/06/27 23:12:25
Acknowledged.
| |
17 LATENCY_INTERACTIVE, | |
chcunningham
2016/06/22 02:13:56
Ditto on documenting comments here. To first time
o1ka
2016/06/23 16:36:16
Done.
| |
18 LATENCY_RTC, | |
19 LATENCY_PLAYBACK | |
20 }; | |
21 | |
22 // |preferred_buffer_size| should be set to 0 if a client has no preference. | |
23 static int GetHighLatencyBufferSize(int sample_rate, | |
24 int preferred_buffer_size); | |
25 | |
26 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred. | |
27 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size); | |
28 | |
29 static int GetInteractiveBufferSize(int hardware_buffer_size); | |
30 }; | |
31 | |
32 } // namespace media | |
33 | |
34 #endif // MEDIA_BASE_AUDIO_LATENCY_H_ | |
OLD | NEW |