1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

cellAudio: use members instead of config values

This commit is contained in:
Megamouse 2021-12-01 22:32:07 +01:00
parent f690d55045
commit e6b4655142

View File

@ -64,19 +64,17 @@ void cell_audio_config::reset(bool backend_changed)
}
const AudioFreq freq = AudioFreq::FREQ_48K;
const AudioSampleSize sample_size = g_cfg.audio.convert_to_s16 ? AudioSampleSize::S16 : AudioSampleSize::FLOAT;
const AudioSampleSize sample_size = raw.convert_to_s16 ? AudioSampleSize::S16 : AudioSampleSize::FLOAT;
const AudioChannelCnt ch_cnt = [&]()
{
const audio_downmix downmix = g_cfg.audio.audio_channel_downmix.get();
switch (downmix)
switch (raw.downmix)
{
case audio_downmix::no_downmix: return AudioChannelCnt::SURROUND_7_1;
case audio_downmix::downmix_to_5_1: return AudioChannelCnt::SURROUND_5_1;
case audio_downmix::downmix_to_stereo: return AudioChannelCnt::STEREO;
case audio_downmix::use_application_settings: return AudioChannelCnt::STEREO; // TODO
default:
fmt::throw_exception("Unknown audio channel mode %s (%d)", downmix, static_cast<int>(downmix));
fmt::throw_exception("Unknown audio channel mode %s (%d)", raw.downmix, static_cast<int>(raw.downmix));
}
}();