Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/base/audio_hardware_config.h" | 5 #include "media/base/audio_hardware_config.h" |
| 6 | 6 |
| 7 using base::AutoLock; | 7 using base::AutoLock; |
| 8 using media::AudioParameters; | 8 using media::AudioParameters; |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 ChannelLayout AudioHardwareConfig::GetOutputChannelLayout() const { | 31 ChannelLayout AudioHardwareConfig::GetOutputChannelLayout() const { |
| 32 AutoLock auto_lock(config_lock_); | 32 AutoLock auto_lock(config_lock_); |
| 33 return output_params_.channel_layout(); | 33 return output_params_.channel_layout(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 int AudioHardwareConfig::GetOutputChannels() const { | 36 int AudioHardwareConfig::GetOutputChannels() const { |
| 37 AutoLock auto_lock(config_lock_); | 37 AutoLock auto_lock(config_lock_); |
| 38 return output_params_.channels(); | 38 return output_params_.channels(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 int AudioHardwareConfig::GetInputBufferSize() const { | |
|
tommi (sloooow) - chröme
2013/09/06 11:20:30
If we can avoid adding this that'd be great. We'r
| |
| 42 AutoLock auto_lock(config_lock_); | |
| 43 return input_params_.frames_per_buffer(); | |
| 44 } | |
| 45 | |
| 41 int AudioHardwareConfig::GetInputSampleRate() const { | 46 int AudioHardwareConfig::GetInputSampleRate() const { |
| 42 AutoLock auto_lock(config_lock_); | 47 AutoLock auto_lock(config_lock_); |
| 43 return input_params_.sample_rate(); | 48 return input_params_.sample_rate(); |
| 44 } | 49 } |
| 45 | 50 |
| 46 ChannelLayout AudioHardwareConfig::GetInputChannelLayout() const { | 51 ChannelLayout AudioHardwareConfig::GetInputChannelLayout() const { |
| 47 AutoLock auto_lock(config_lock_); | 52 AutoLock auto_lock(config_lock_); |
| 48 return input_params_.channel_layout(); | 53 return input_params_.channel_layout(); |
| 49 } | 54 } |
| 50 | 55 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 71 input_params_ = input_params; | 76 input_params_ = input_params; |
| 72 } | 77 } |
| 73 | 78 |
| 74 void AudioHardwareConfig::UpdateOutputConfig( | 79 void AudioHardwareConfig::UpdateOutputConfig( |
| 75 const AudioParameters& output_params) { | 80 const AudioParameters& output_params) { |
| 76 AutoLock auto_lock(config_lock_); | 81 AutoLock auto_lock(config_lock_); |
| 77 output_params_ = output_params; | 82 output_params_ = output_params; |
| 78 } | 83 } |
| 79 | 84 |
| 80 } // namespace media | 85 } // namespace media |
| OLD | NEW |