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

Unified Diff: media/audio/audio_output_controller.h

Issue 10830268: Allow audio system to handle synchronized low-latency audio I/O (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_low_latency_input_output_unittest.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.h
===================================================================
--- media/audio/audio_output_controller.h (revision 156123)
+++ media/audio/audio_output_controller.h (working copy)
@@ -83,6 +83,8 @@
// A synchronous reader interface used by AudioOutputController for
// synchronous reading.
+ // TODO(crogers): find a better name for this class and the Read() method
+ // now that it can handle synchronized I/O.
class SyncReader {
public:
virtual ~SyncReader() {}
@@ -92,9 +94,10 @@
// prepare more data and perform synchronization.
virtual void UpdatePendingBytes(uint32 bytes) = 0;
- // Attempt to completely fill |audio_bus|, return the actual number of
+ // Attempt to completely fill |dest|, return the actual number of
// frames that could be read.
- virtual int Read(AudioBus* audio_bus) = 0;
+ // |source| may optionally be provided for input data.
+ virtual int Read(AudioBus* source, AudioBus* dest) = 0;
// Close this synchronous reader.
virtual void Close() = 0;
@@ -144,8 +147,11 @@
///////////////////////////////////////////////////////////////////////////
// AudioSourceCallback methods.
- virtual int OnMoreData(AudioBus* audio_bus,
+ virtual int OnMoreData(AudioBus* dest,
AudioBuffersState buffers_state) OVERRIDE;
+ virtual int OnMoreIOData(AudioBus* source,
+ AudioBus* dest,
+ AudioBuffersState buffers_state) OVERRIDE;
virtual void OnError(AudioOutputStream* stream, int code) OVERRIDE;
virtual void WaitTillDataReady() OVERRIDE;
« no previous file with comments | « media/audio/audio_low_latency_input_output_unittest.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698