| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |