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

Side by Side Diff: media/audio/audio_output_dispatcher.cc

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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_output_dispatcher.h" 5 #include "media/audio/audio_output_dispatcher.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 AudioOutputDispatcher::AudioOutputDispatcher( 11 AudioOutputDispatcher::AudioOutputDispatcher(
12 AudioManager* audio_manager, 12 AudioManager* audio_manager,
13 const AudioParameters& params) 13 const AudioParameters& params,
14 const std::string& input_device_id)
14 : audio_manager_(audio_manager), 15 : audio_manager_(audio_manager),
15 message_loop_(base::MessageLoop::current()), 16 message_loop_(base::MessageLoop::current()),
16 params_(params) { 17 params_(params),
18 input_device_id_(input_device_id) {
17 // We expect to be instantiated on the audio thread. Otherwise the 19 // We expect to be instantiated on the audio thread. Otherwise the
18 // message_loop_ member will point to the wrong message loop! 20 // message_loop_ member will point to the wrong message loop!
19 DCHECK(audio_manager->GetMessageLoop()->BelongsToCurrentThread()); 21 DCHECK(audio_manager->GetMessageLoop()->BelongsToCurrentThread());
20 } 22 }
21 23
22 AudioOutputDispatcher::~AudioOutputDispatcher() { 24 AudioOutputDispatcher::~AudioOutputDispatcher() {
23 DCHECK_EQ(base::MessageLoop::current(), message_loop_); 25 DCHECK_EQ(base::MessageLoop::current(), message_loop_);
24 } 26 }
25 27
26 } // namespace media 28 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698