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

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

Issue 2067863003: Mixing audio with different latency requirements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android test fix Created 4 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
« no previous file with comments | « media/base/audio_hardware_config_unittest.cc ('k') | media/base/audio_latency.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // Categories of expected latencies for input/output audio. Do not change
15 // existing values, they are used for UMA histogram reporting.
16 enum LatencyType {
17 // Specific latency in milliseconds.
18 LATENCY_EXACT_MS = 0,
19 // Lowest possible latency which does not cause glitches.
20 LATENCY_INTERACTIVE = 1,
21 // Latency optimized for real time communication.
22 LATENCY_RTC = 2,
23 // Latency optimized for continuous playback and power saving.
24 LATENCY_PLAYBACK = 3,
25 // For validation only.
26 LATENCY_LAST = LATENCY_PLAYBACK,
27 LATENCY_COUNT = LATENCY_LAST + 1
28 };
29
30 // |preferred_buffer_size| should be set to 0 if a client has no preference.
31 static int GetHighLatencyBufferSize(int sample_rate,
32 int preferred_buffer_size);
33
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);
36
37 static int GetInteractiveBufferSize(int hardware_buffer_size);
38 };
39
40 } // namespace media
41
42 #endif // MEDIA_BASE_AUDIO_LATENCY_H_
OLDNEW
« no previous file with comments | « media/base/audio_hardware_config_unittest.cc ('k') | media/base/audio_latency.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698