From 5b26e4ef94afca8450f07c42393180e3c97f9c00 Mon Sep 17 00:00:00 2001 From: Mary Date: Tue, 18 Aug 2020 21:03:55 +0200 Subject: Misc audio fixes (#1348) Changes: Implement software surround downmixing (fix #796). Fix a crash when no audio renderer were created when stopping emulation. NOTE: This PR also disable support of 5.1 surround on the OpenAL backend as we cannot detect if the hardware directly support it. (the downmixing applied by OpenAL on Windows is terribly slow) --- Ryujinx.Audio/Native/libsoundio/SoundIODevice.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Ryujinx.Audio/Native') diff --git a/Ryujinx.Audio/Native/libsoundio/SoundIODevice.cs b/Ryujinx.Audio/Native/libsoundio/SoundIODevice.cs index 81b78b67..dff945b6 100644 --- a/Ryujinx.Audio/Native/libsoundio/SoundIODevice.cs +++ b/Ryujinx.Audio/Native/libsoundio/SoundIODevice.cs @@ -197,6 +197,11 @@ namespace SoundIOSharp return Natives.soundio_device_supports_sample_rate (handle, sampleRate); } + public bool SupportsChannelCount(int channelCount) + { + return Natives.soundio_device_supports_layout(handle, SoundIOChannelLayout.GetDefault(channelCount).Handle); + } + public int GetNearestSampleRate (int sampleRate) { return Natives.soundio_device_nearest_sample_rate (handle, sampleRate); -- cgit v1.2.3