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

Side by Side Diff: media/audio/audio_buffers_state.h

Issue 9689015: Remove unused AudioBuffersState member. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_
6 #define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ 6 #define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_
7 7
8 #include "base/time.h"
9 #include "media/base/media_export.h" 8 #include "media/base/media_export.h"
10 9
11 // AudioBuffersState struct stores current state of audio buffers along with 10 // AudioBuffersState struct stores current state of audio buffers.
12 // the timestamp of the moment this state corresponds to. It is used for audio 11 // It is used for audio synchronization.
13 // synchronization.
14 struct MEDIA_EXPORT AudioBuffersState { 12 struct MEDIA_EXPORT AudioBuffersState {
15 AudioBuffersState(); 13 AudioBuffersState() : pending_bytes(0), hardware_delay_bytes(0) {
vrk (LEFT CHROMIUM) 2012/03/12 18:45:01 As per Chromium style guide, don't inline empty ct
16 AudioBuffersState(int pending_bytes, int hardware_delay_bytes); 14 }
17 15
18 int total_bytes(); 16 AudioBuffersState(int pending_bytes, int hardware_delay_bytes)
17 : pending_bytes(pending_bytes),
18 hardware_delay_bytes(hardware_delay_bytes) {
19 }
20
21 int total_bytes() {
22 return pending_bytes + hardware_delay_bytes;
23 }
19 24
20 // Number of bytes we currently have in our software buffer. 25 // Number of bytes we currently have in our software buffer.
21 int pending_bytes; 26 int pending_bytes;
22 27
23 // Number of bytes that have been written to the device, but haven't 28 // Number of bytes that have been written to the device, but haven't
24 // been played yet. 29 // been played yet.
25 int hardware_delay_bytes; 30 int hardware_delay_bytes;
26
27 // Timestamp of the moment when the buffers state was captured. It is used
28 // to account for the time it takes to deliver AudioBuffersState from
29 // the browser process to the renderer.
30 base::Time timestamp;
31 }; 31 };
32 32
33
34 #endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ 33 #endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698