Index: media/audio/audio_output_mixer.h |
=================================================================== |
--- media/audio/audio_output_mixer.h (revision 133745) |
+++ media/audio/audio_output_mixer.h (working copy) |
@@ -10,6 +10,7 @@ |
#define MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ |
#include <map> |
+#include <set> |
#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
@@ -61,6 +62,14 @@ |
// audio manager thread is safe. |
base::Lock lock_; |
+ // Information for each each in-flight buffer. |
+ struct BufferData { |
+ explicit BufferData(int len) : length(len) { } |
+ int length; |
+ }; |
+ typedef std::map<void*, BufferData> BufferMap; |
+ BufferMap buffer_data_; |
+ |
// List of audio output proxies currently being played. |
// For every proxy we store aux structure containing data necessary for |
// mixing. |
@@ -68,6 +77,9 @@ |
AudioOutputStream::AudioSourceCallback* audio_source_callback; |
double volume; |
int pending_bytes; |
+ std::set<void*> buffers; // Used to catch when we stop prebuffering and |
+ // start releasing buffers. |
+ bool prebuffering; |
}; |
typedef std::map<AudioOutputProxy*, ProxyData> ProxyMap; |
ProxyMap proxies_; |