Actually respect the no sound output config variable
This commit is contained in:
parent
04223d2c81
commit
b4517d8e0d
|
@ -22,23 +22,26 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public Sound(IntPtr mainWindowHandle)
|
public Sound(IntPtr mainWindowHandle)
|
||||||
{
|
{
|
||||||
if (OSTailoredCode.IsUnixHost)
|
if (Global.Config.SoundOutputMethod != ESoundOutputMethod.Dummy)
|
||||||
{
|
{
|
||||||
// at the moment unix/mono can only support OpenAL (so ignore whatever is set in the config)
|
if (OSTailoredCode.IsUnixHost)
|
||||||
_outputDevice = new OpenALSoundOutput(this);
|
{
|
||||||
}
|
// at the moment unix/mono can only support OpenAL (so ignore whatever is set in the config)
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.OpenAL)
|
|
||||||
_outputDevice = new OpenALSoundOutput(this);
|
_outputDevice = new OpenALSoundOutput(this);
|
||||||
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.DirectSound)
|
}
|
||||||
_outputDevice = new DirectSoundSoundOutput(this, mainWindowHandle, Global.Config.SoundDevice);
|
else
|
||||||
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.XAudio2)
|
{
|
||||||
_outputDevice = new XAudio2SoundOutput(this);
|
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.OpenAL)
|
||||||
}
|
_outputDevice = new OpenALSoundOutput(this);
|
||||||
|
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.DirectSound)
|
||||||
|
_outputDevice = new DirectSoundSoundOutput(this, mainWindowHandle, Global.Config.SoundDevice);
|
||||||
|
if (Global.Config.SoundOutputMethod == ESoundOutputMethod.XAudio2)
|
||||||
|
_outputDevice = new XAudio2SoundOutput(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (_outputDevice == null)
|
if (_outputDevice == null)
|
||||||
_outputDevice = new DummySoundOutput(this);
|
_outputDevice = new DummySoundOutput(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue