mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 14:20:05 +00:00
Merge pull request #3046 from MerryMage/sdl-disallow-device-changes
sdl2_sink: Disallow audio device from changing any parameter other than the frequency
This commit is contained in:
commit
b36f748acd
@ -55,8 +55,8 @@ SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) {
|
|||||||
device = Settings::values.audio_device_id.c_str();
|
device = Settings::values.audio_device_id.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
impl->audio_device_id = SDL_OpenAudioDevice(device, false, &desired_audiospec,
|
impl->audio_device_id = SDL_OpenAudioDevice(
|
||||||
&obtained_audiospec, SDL_AUDIO_ALLOW_ANY_CHANGE);
|
device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
|
||||||
if (impl->audio_device_id <= 0) {
|
if (impl->audio_device_id <= 0) {
|
||||||
LOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code %d for device \"%s\"",
|
LOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code %d for device \"%s\"",
|
||||||
impl->audio_device_id, Settings::values.audio_device_id.c_str());
|
impl->audio_device_id, Settings::values.audio_device_id.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user