forked from Mirror/Ryujinx
Added fallbacks for all Audio Backends (#2582)
* Added fallbacks for all Audio Backends
* Commit Suggestion
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Resolve elses.
* Revert "Resolve elses."
This reverts commit 9aec3e9e77
.
* Suggestions completed
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
parent
5b8ceb9173
commit
686b63e479
2 changed files with 79 additions and 9 deletions
|
@ -519,7 +519,7 @@ namespace Ryujinx.Configuration
|
|||
System.EnablePtc.Value = true;
|
||||
System.EnableFsIntegrityChecks.Value = true;
|
||||
System.FsGlobalAccessLogMode.Value = 0;
|
||||
System.AudioBackend.Value = AudioBackend.OpenAl;
|
||||
System.AudioBackend.Value = AudioBackend.SDL2;
|
||||
System.MemoryManagerMode.Value = MemoryManagerMode.HostMappedUnsafe;
|
||||
System.ExpandRam.Value = false;
|
||||
System.IgnoreMissingServices.Value = false;
|
||||
|
|
|
@ -411,24 +411,15 @@ namespace Ryujinx.Ui
|
|||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 audio is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.SoundIo)
|
||||
{
|
||||
if (SoundIoHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
deviceDriver = new SoundIoHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SoundIO is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.OpenAl)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to OpenAL.");
|
||||
|
||||
if (OpenALHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found OpenAL, changing configuration.");
|
||||
|
||||
ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.OpenAl;
|
||||
SaveConfig();
|
||||
|
||||
deviceDriver = new OpenALHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
|
@ -450,6 +441,85 @@ namespace Ryujinx.Ui
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.SoundIo)
|
||||
{
|
||||
if (SoundIoHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
deviceDriver = new SoundIoHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SoundIO is not supported, trying to fall back to SDL2.");
|
||||
|
||||
if (SDL2HardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found SDL2, changing configuration.");
|
||||
|
||||
ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SDL2;
|
||||
SaveConfig();
|
||||
|
||||
deviceDriver = new SDL2HardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to OpenAL.");
|
||||
|
||||
if (OpenALHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found OpenAL, changing configuration.");
|
||||
|
||||
ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.OpenAl;
|
||||
SaveConfig();
|
||||
|
||||
deviceDriver = new OpenALHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "OpenAL is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.OpenAl)
|
||||
{
|
||||
if (OpenALHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
deviceDriver = new OpenALHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "OpenAL is not supported, trying to fall back to SDL2.");
|
||||
|
||||
if (SDL2HardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found SDL2, changing configuration.");
|
||||
|
||||
ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SDL2;
|
||||
SaveConfig();
|
||||
|
||||
deviceDriver = new SDL2HardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SDL2 is not supported, trying to fall back to SoundIO.");
|
||||
|
||||
if (SoundIoHardwareDeviceDriver.IsSupported)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "Found SoundIO, changing configuration.");
|
||||
|
||||
ConfigurationState.Instance.System.AudioBackend.Value = AudioBackend.SoundIo;
|
||||
SaveConfig();
|
||||
|
||||
deviceDriver = new SoundIoHardwareDeviceDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Audio, "SoundIO is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value
|
||||
? HLE.MemoryConfiguration.MemoryConfiguration6GB
|
||||
|
|
Loading…
Reference in a new issue