Fix divide by zero in SoundOutputProvider.

This commit is contained in:
jdpurcell 2015-01-23 05:02:31 +00:00
parent e3e5ae4934
commit 5026d39da1
1 changed files with 4 additions and 1 deletions

View File

@ -139,7 +139,10 @@ namespace BizHawk.Client.EmuHawk
BaseSoundProvider.GetSamples(out samples, out count);
scaleFactor *= SamplesPerFrame / count;
if (count != 0)
{
scaleFactor *= SamplesPerFrame / count;
}
double newCountTarget = count * scaleFactor;
int newCount = (int)Math.Round(newCountTarget + _resampleLengthRoundingError);