mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-29 21:12:33 +01: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
No EOL
335 B
C#
16 lines
No EOL
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;
|
|
}
|
|
}
|
|
} |