Refactor CurrentOS usage in Sound
This commit is contained in:
parent
cefba8e16e
commit
1887420244
|
@ -25,15 +25,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public Sound(IntPtr mainWindowHandle)
|
||||
{
|
||||
if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.OpenAL)
|
||||
_outputDevice = new OpenALSoundOutput(this);
|
||||
if (OSTailoredCode.CurrentOS == OSTailoredCode.DistinctOS.Windows)
|
||||
{
|
||||
if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.OpenAL)
|
||||
_outputDevice = new OpenALSoundOutput(this);
|
||||
if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.DirectSound)
|
||||
_outputDevice = new DirectSoundSoundOutput(this, mainWindowHandle);
|
||||
if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.XAudio2)
|
||||
_outputDevice = new XAudio2SoundOutput(this);
|
||||
}
|
||||
else _outputDevice = new OpenALSoundOutput(this); // at the moment unix/mono can only support OpenAL (so ignore whatever is set in the config)
|
||||
|
||||
if (_outputDevice == null)
|
||||
_outputDevice = new DummySoundOutput(this);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue