blob: 79244aeb1a51dc24d103da8a453f41708ba4bad0 [file] [log] [blame]
// Copyright (c) 2012 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/base/media_export.h"
namespace media {
// AudioBuffersState struct stores current state of audio buffers.
// It is used for audio synchronization.
struct MEDIA_EXPORT AudioBuffersState {
AudioBuffersState(int pending_bytes, int hardware_delay_bytes);
int total_bytes() {
return pending_bytes + hardware_delay_bytes;
// Number of bytes we currently have in our software buffer.
int pending_bytes;
// Number of bytes that have been written to the device, but haven't
// been played yet.
int hardware_delay_bytes;
} // namespace media