summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_buffers_state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'media/audio/audio_buffers_state.cc')
-rw-r--r--media/audio/audio_buffers_state.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/media/audio/audio_buffers_state.cc b/media/audio/audio_buffers_state.cc
new file mode 100644
index 0000000..f31cf1d
--- /dev/null
+++ b/media/audio/audio_buffers_state.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2010 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.
+
+#include "media/audio/audio_buffers_state.h"
+
+AudioBuffersState::AudioBuffersState()
+ : pending_bytes(0),
+ hardware_delay_bytes(0),
+ timestamp(base::Time::Now()) {
+}
+
+AudioBuffersState::AudioBuffersState(int pending_bytes,
+ int hardware_delay_bytes)
+ : pending_bytes(pending_bytes),
+ hardware_delay_bytes(hardware_delay_bytes),
+ timestamp(base::Time::Now()) {
+}
+
+int AudioBuffersState::total_bytes() {
+ return pending_bytes + hardware_delay_bytes;
+}