#include "media/audio/audio_system_helper.h"
#include "base/task/single_thread_task_runner.h"
#include "media/audio/audio_manager.h"
#include "media/base/limits.h"
namespace media {
namespace {
std::optional<AudioParameters> TryToFixChannels(const AudioParameters& params) { … }
}
AudioSystemHelper::AudioSystemHelper(AudioManager* audio_manager)
: … { … }
AudioSystemHelper::~AudioSystemHelper() = default;
void AudioSystemHelper::GetInputStreamParameters(
const std::string& device_id,
AudioSystem::OnAudioParamsCallback on_params_cb) { … }
void AudioSystemHelper::GetOutputStreamParameters(
const std::string& device_id,
AudioSystem::OnAudioParamsCallback on_params_cb) { … }
void AudioSystemHelper::HasInputDevices(
AudioSystem::OnBoolCallback on_has_devices_cb) { … }
void AudioSystemHelper::HasOutputDevices(
AudioSystem::OnBoolCallback on_has_devices_cb) { … }
void AudioSystemHelper::GetDeviceDescriptions(
bool for_input,
AudioSystem::OnDeviceDescriptionsCallback on_descriptions_cb) { … }
void AudioSystemHelper::GetAssociatedOutputDeviceID(
const std::string& input_device_id,
AudioSystem::OnDeviceIdCallback on_device_id_cb) { … }
void AudioSystemHelper::GetInputDeviceInfo(
const std::string& input_device_id,
AudioSystem::OnInputDeviceInfoCallback on_input_device_info_cb) { … }
std::optional<AudioParameters> AudioSystemHelper::ComputeInputParameters(
const std::string& device_id) { … }
std::optional<AudioParameters> AudioSystemHelper::ComputeOutputParameters(
const std::string& device_id) { … }
}