This source file includes following definitions.
- output_params_
- GetOutputBufferSize
- GetOutputSampleRate
- GetOutputChannelLayout
- GetOutputChannels
- GetInputSampleRate
- GetInputChannelLayout
- GetInputChannels
- GetInputConfig
- GetOutputConfig
- UpdateInputConfig
- UpdateOutputConfig
#include "media/base/audio_hardware_config.h"
using base::AutoLock;
using media::AudioParameters;
namespace media {
AudioHardwareConfig::AudioHardwareConfig(
const AudioParameters& input_params,
const AudioParameters& output_params)
: input_params_(input_params),
output_params_(output_params) {
}
AudioHardwareConfig::~AudioHardwareConfig() {}
int AudioHardwareConfig::GetOutputBufferSize() const {
AutoLock auto_lock(config_lock_);
return output_params_.frames_per_buffer();
}
int AudioHardwareConfig::GetOutputSampleRate() const {
AutoLock auto_lock(config_lock_);
return output_params_.sample_rate();
}
ChannelLayout AudioHardwareConfig::GetOutputChannelLayout() const {
AutoLock auto_lock(config_lock_);
return output_params_.channel_layout();
}
int AudioHardwareConfig::GetOutputChannels() const {
AutoLock auto_lock(config_lock_);
return output_params_.channels();
}
int AudioHardwareConfig::GetInputSampleRate() const {
AutoLock auto_lock(config_lock_);
return input_params_.sample_rate();
}
ChannelLayout AudioHardwareConfig::GetInputChannelLayout() const {
AutoLock auto_lock(config_lock_);
return input_params_.channel_layout();
}
int AudioHardwareConfig::GetInputChannels() const {
AutoLock auto_lock(config_lock_);
return input_params_.channels();
}
media::AudioParameters
AudioHardwareConfig::GetInputConfig() const {
AutoLock auto_lock(config_lock_);
return input_params_;
}
media::AudioParameters
AudioHardwareConfig::GetOutputConfig() const {
AutoLock auto_lock(config_lock_);
return output_params_;
}
void AudioHardwareConfig::UpdateInputConfig(
const AudioParameters& input_params) {
AutoLock auto_lock(config_lock_);
input_params_ = input_params;
}
void AudioHardwareConfig::UpdateOutputConfig(
const AudioParameters& output_params) {
AutoLock auto_lock(config_lock_);
output_params_ = output_params;
}
}