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

Unified Diff: media/audio/audio_output_device.h

Issue 15979015: Reland 15721002: Hook up the device selection to the WebAudio live audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. Created 7 years, 7 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
Index: media/audio/audio_output_device.h
diff --git a/media/audio/audio_output_device.h b/media/audio/audio_output_device.h
index a16b9edb5c922b0923ed0c5982aa00ad120ea0b9..2af4f48e7ecf7bd24eea09fd0a09abe854c335ee 100644
--- a/media/audio/audio_output_device.h
+++ b/media/audio/audio_output_device.h
@@ -81,6 +81,18 @@ class MEDIA_EXPORT AudioOutputDevice
AudioOutputDevice(scoped_ptr<AudioOutputIPC> ipc,
const scoped_refptr<base::MessageLoopProxy>& io_loop);
+ // Initialize function for clients wishing to have unified input and
+ // output, |params| may specify |input_channels| > 0, representing a
+ // number of input channels which will be at the same sample-rate
+ // and buffer-size as the output as specified in |params|. |session_id| is
+ // used for the browser to select the correct input device.
+ // In this case, the callback's RenderIO() method will be called instead
+ // of Render(), providing the synchronized input data at the same time as
+ // when new output data is to be rendered.
+ void InitializeUnifiedStream(const AudioParameters& params,
+ RenderCallback* callback,
+ int session_id);
+
// AudioRendererSink implementation.
virtual void Initialize(const AudioParameters& params,
RenderCallback* callback) OVERRIDE;
@@ -144,6 +156,10 @@ class MEDIA_EXPORT AudioOutputDevice
// State of Play() / Pause() calls before OnStreamCreated() is called.
bool play_on_start_;
+ // The media session ID used to identify which input device to be started.
+ // Only used by Unified IO.
+ int session_id_;
+
// Our audio thread callback class. See source file for details.
class AudioThreadCallback;

Powered by Google App Engine
This is Rietveld 408576698