Index: media/audio/audio_buffers_state.h |
=================================================================== |
--- media/audio/audio_buffers_state.h (revision 125439) |
+++ media/audio/audio_buffers_state.h (working copy) |
@@ -5,30 +5,29 @@ |
#ifndef MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |
#define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |
-#include "base/time.h" |
#include "media/base/media_export.h" |
-// AudioBuffersState struct stores current state of audio buffers along with |
-// the timestamp of the moment this state corresponds to. It is used for audio |
-// synchronization. |
+// AudioBuffersState struct stores current state of audio buffers. |
+// It is used for audio synchronization. |
struct MEDIA_EXPORT AudioBuffersState { |
- AudioBuffersState(); |
- AudioBuffersState(int pending_bytes, int hardware_delay_bytes); |
+ 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
|
+ } |
- int total_bytes(); |
+ AudioBuffersState(int pending_bytes, int hardware_delay_bytes) |
+ : pending_bytes(pending_bytes), |
+ hardware_delay_bytes(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; |
- |
- // Timestamp of the moment when the buffers state was captured. It is used |
- // to account for the time it takes to deliver AudioBuffersState from |
- // the browser process to the renderer. |
- base::Time timestamp; |
}; |
- |
#endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |