Implement audio backend configuration option (#1325)
* Implement audio backend configuration option * Use OpenAL by default * Increment version number in config.json and add 30px to the height of the settings window * nits * capitalise audio backend names
This commit is contained in:
parent
af72875bee
commit
7cb6532971
8 changed files with 152 additions and 54 deletions
|
@ -647,24 +647,32 @@ namespace Ryujinx.Ui
|
|||
return new Renderer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Picks an <see cref="IAalOutput"/> audio output renderer supported on this machine
|
||||
/// </summary>
|
||||
/// <returns>An <see cref="IAalOutput"/> supported by this machine</returns>
|
||||
private static IAalOutput InitializeAudioEngine()
|
||||
{
|
||||
if (OpenALAudioOut.IsSupported)
|
||||
if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.SoundIo)
|
||||
{
|
||||
return new OpenALAudioOut();
|
||||
if (SoundIoAudioOut.IsSupported)
|
||||
{
|
||||
return new SoundIoAudioOut();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.PrintWarning(LogClass.Audio, "SoundIO is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
else if (SoundIoAudioOut.IsSupported)
|
||||
else if (ConfigurationState.Instance.System.AudioBackend.Value == AudioBackend.OpenAl)
|
||||
{
|
||||
return new SoundIoAudioOut();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DummyAudioOut();
|
||||
if (OpenALAudioOut.IsSupported)
|
||||
{
|
||||
return new OpenALAudioOut();
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.PrintWarning(LogClass.Audio, "OpenAL is not supported, falling back to dummy audio out.");
|
||||
}
|
||||
}
|
||||
|
||||
return new DummyAudioOut();
|
||||
}
|
||||
|
||||
//Events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue