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

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

Issue 8491044: Link things together and enable the device selection for linux and mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: rebase2 Created 9 years 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
« no previous file with comments | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_manager_base.h" 5 #include "media/audio/audio_manager_base.h"
6 #include "media/audio/audio_output_dispatcher.h" 6 #include "media/audio/audio_output_dispatcher.h"
7 #include "media/audio/audio_output_proxy.h" 7 #include "media/audio/audio_output_proxy.h"
8 8
9 static const int kStreamCloseDelayMs = 5000; 9 static const int kStreamCloseDelayMs = 5000;
10 10
11 const char AudioManagerBase::kDefaultDeviceName[] = "Default"; 11 const char AudioManagerBase::kDefaultDeviceName[] = "Default";
12 const char AudioManagerBase::kDefaultDeviceId[] = "default";
12 13
13 AudioManagerBase::AudioManagerBase() 14 AudioManagerBase::AudioManagerBase()
14 : audio_thread_("AudioThread"), 15 : audio_thread_("AudioThread"),
15 initialized_(false), 16 initialized_(false),
16 num_active_input_streams_(0) { 17 num_active_input_streams_(0) {
17 } 18 }
18 19
19 AudioManagerBase::~AudioManagerBase() { 20 AudioManagerBase::~AudioManagerBase() {
20 DCHECK(!audio_thread_.IsRunning()); 21 DCHECK(!audio_thread_.IsRunning());
21 } 22 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void AudioManagerBase::DecreaseActiveInputStreamCount() { 73 void AudioManagerBase::DecreaseActiveInputStreamCount() {
73 base::AutoLock auto_lock(active_input_streams_lock_); 74 base::AutoLock auto_lock(active_input_streams_lock_);
74 DCHECK_GT(num_active_input_streams_, 0); 75 DCHECK_GT(num_active_input_streams_, 0);
75 --num_active_input_streams_; 76 --num_active_input_streams_;
76 } 77 }
77 78
78 bool AudioManagerBase::IsRecordingInProcess() { 79 bool AudioManagerBase::IsRecordingInProcess() {
79 base::AutoLock auto_lock(active_input_streams_lock_); 80 base::AutoLock auto_lock(active_input_streams_lock_);
80 return num_active_input_streams_ > 0; 81 return num_active_input_streams_ > 0;
81 } 82 }
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698