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

Unified 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: mixing inputs of the same latency Created 4 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 side-by-side diff with in-line comments
Download patch
Index: media/base/audio_latency.h
diff --git a/media/base/audio_latency.h b/media/base/audio_latency.h
new file mode 100644
index 0000000000000000000000000000000000000000..b29df219a96e2c9d7e57e0c1d11fb0daf5f975c3
--- /dev/null
+++ b/media/base/audio_latency.h
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_AUDIO_LATENCY_H_
+#define MEDIA_BASE_AUDIO_LATENCY_H_
+
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT AudioLatency {
+ public:
+ // Categoties of expected latencies for input/output audio.
+ enum LatencyType {
+ 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.
+ 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.
+ LATENCY_RTC,
+ LATENCY_PLAYBACK
+ };
+
+ // |preferred_buffer_size| should be set to 0 if a client has no preference.
+ static int GetHighLatencyBufferSize(int sample_rate,
+ int preferred_buffer_size);
+
+ // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred.
+ static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size);
+
+ static int GetInteractiveBufferSize(int hardware_buffer_size);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_AUDIO_LATENCY_H_

Powered by Google App Engine
This is Rietveld 408576698