Fix bug with async sound.

This commit is contained in:
J.D. Purcell 2016-12-14 18:27:04 -05:00
parent afd55fdc6b
commit 036358fbf9
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ namespace BizHawk.Client.EmuHawk
if (_soundProvider != null) _soundProvider.DiscardSamples();
if (_outputProvider != null) _outputProvider.DiscardSamples();
}
else if (_soundProvider.SyncMode == SyncSoundMode.Sync)
else if (_soundProvider != null && _soundProvider.SyncMode == SyncSoundMode.Sync)
{
if (Global.Config.SoundThrottle)
{
@ -201,7 +201,7 @@ namespace BizHawk.Client.EmuHawk
_outputProvider.GetSamples(samplesNeeded, out samples, out samplesProvided);
}
}
else if (_soundProvider != null && _soundProvider.SyncMode == SyncSoundMode.Sync)
else if (_soundProvider != null && _soundProvider.SyncMode == SyncSoundMode.Async)
{
samples = new short[samplesNeeded * ChannelCount];