summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_output_dispatcher.cc
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-31 17:08:36 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-31 17:08:36 +0000
commit1b00e2fdfe30ebe872134af1ab07e6861d488fde (patch)
treef822b28daa0bdafc536e75a86321e72cfd043459 /media/audio/audio_output_dispatcher.cc
parent41071e4f7f0d3e51cb2f3e929fa922962e889b8f (diff)
downloadchromium_src-1b00e2fdfe30ebe872134af1ab07e6861d488fde.zip
chromium_src-1b00e2fdfe30ebe872134af1ab07e6861d488fde.tar.gz
chromium_src-1b00e2fdfe30ebe872134af1ab07e6861d488fde.tar.bz2
Hook up the device selection to the WebAudio live audio.
WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. BUG=147327 TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. Review URL: https://chromiumcodereview.appspot.com/15721002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output_dispatcher.cc')
-rw-r--r--media/audio/audio_output_dispatcher.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/audio/audio_output_dispatcher.cc b/media/audio/audio_output_dispatcher.cc
index be9cb57..de30b1c 100644
--- a/media/audio/audio_output_dispatcher.cc
+++ b/media/audio/audio_output_dispatcher.cc
@@ -10,10 +10,12 @@ namespace media {
AudioOutputDispatcher::AudioOutputDispatcher(
AudioManager* audio_manager,
- const AudioParameters& params)
+ const AudioParameters& params,
+ const std::string& input_device_id)
: audio_manager_(audio_manager),
message_loop_(base::MessageLoop::current()),
- params_(params) {
+ params_(params),
+ input_device_id_(input_device_id) {
// We expect to be instantiated on the audio thread. Otherwise the
// message_loop_ member will point to the wrong message loop!
DCHECK(audio_manager->GetMessageLoop()->BelongsToCurrentThread());