From 036358fbf97d5d72eefe8addc89f78d09896ca86 Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Wed, 14 Dec 2016 18:27:04 -0500 Subject: [PATCH] Fix bug with async sound. --- BizHawk.Client.EmuHawk/Sound/Sound.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/Sound/Sound.cs b/BizHawk.Client.EmuHawk/Sound/Sound.cs index 043c37f053..b1cf583236 100644 --- a/BizHawk.Client.EmuHawk/Sound/Sound.cs +++ b/BizHawk.Client.EmuHawk/Sound/Sound.cs @@ -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];