mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-07 22:38:37 +00:00
5b26e4ef94
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)
16 lines
335 B
C#
16 lines
335 B
C#
namespace Ryujinx.Audio
|
|
{
|
|
public static class DspUtils
|
|
{
|
|
public static short Saturate(int Value)
|
|
{
|
|
if (Value > short.MaxValue)
|
|
Value = short.MaxValue;
|
|
|
|
if (Value < short.MinValue)
|
|
Value = short.MinValue;
|
|
|
|
return (short)Value;
|
|
}
|
|
}
|
|
} |