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

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

Issue 197453002: Support 3 channels for audio input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | media/audio/audio_manager_base.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) 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_input_controller.h" 5 #include "media/audio/audio_input_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/scoped_histogram_timer.h" 10 #include "media/base/scoped_histogram_timer.h"
11 #include "media/base/user_input_monitor.h" 11 #include "media/base/user_input_monitor.h"
12 12
13 namespace { 13 namespace {
14 const int kMaxInputChannels = 2; 14 const int kMaxInputChannels = 3;
15 15
16 // TODO(henrika): remove usage of timers and add support for proper 16 // TODO(henrika): remove usage of timers and add support for proper
17 // notification of when the input device is removed. This was originally added 17 // notification of when the input device is removed. This was originally added
18 // to resolve http://crbug.com/79936 for Windows platforms. This then caused 18 // to resolve http://crbug.com/79936 for Windows platforms. This then caused
19 // breakage (very hard to repro bugs!) on other platforms: See 19 // breakage (very hard to repro bugs!) on other platforms: See
20 // http://crbug.com/226327 and http://crbug.com/230972. 20 // http://crbug.com/226327 and http://crbug.com/230972.
21 // See also that the timer has been disabled on Mac now due to 21 // See also that the timer has been disabled on Mac now due to
22 // crbug.com/357501. 22 // crbug.com/357501.
23 const int kTimerResetIntervalSeconds = 1; 23 const int kTimerResetIntervalSeconds = 1;
24 // We have received reports that the timer can be too trigger happy on some 24 // We have received reports that the timer can be too trigger happy on some
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 void AudioInputController::SetDataIsActive(bool enabled) { 394 void AudioInputController::SetDataIsActive(bool enabled) {
395 base::subtle::Release_Store(&data_is_active_, enabled); 395 base::subtle::Release_Store(&data_is_active_, enabled);
396 } 396 }
397 397
398 bool AudioInputController::GetDataIsActive() { 398 bool AudioInputController::GetDataIsActive() {
399 return (base::subtle::Acquire_Load(&data_is_active_) != false); 399 return (base::subtle::Acquire_Load(&data_is_active_) != false);
400 } 400 }
401 401
402 } // namespace media 402 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698