Fix sound not being completely silent at level 0.

This commit is contained in:
jdpurcell 2015-01-25 16:08:28 +00:00
parent e51ffd95d8
commit 984edda62f
1 changed files with 3 additions and 4 deletions

View File

@ -100,10 +100,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (_deviceBuffer == null) return; if (_deviceBuffer == null) return;
if (Global.Config.SoundVolume == 0) _deviceBuffer.Volume = Global.Config.SoundVolume == 0 ? -10000 : ((100 - Global.Config.SoundVolume) * -45);
_deviceBuffer.Volume = -5000;
else
_deviceBuffer.Volume = 0 - ((100 - Global.Config.SoundVolume) * 45);
} }
public void StartSound() public void StartSound()
@ -321,7 +318,9 @@ namespace BizHawk.Client.EmuHawk
samplesProvided = samplesNeeded; samplesProvided = samplesNeeded;
} }
else else
{
return; return;
}
WriteSamples(samples, samplesProvided); WriteSamples(samples, samplesProvided);
} }