From 201d9b65922fdc1b4d3db3716c207610d4d4356b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Tue, 1 May 2007 18:57:19 +0000 Subject: [PATCH] fix mixer underflow (muted pcspeaker in unlocked speed mode; thanks to ykhwong for his report) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2848 --- src/hardware/mixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/mixer.cpp b/src/hardware/mixer.cpp index eee53355..f89a6fba 100644 --- a/src/hardware/mixer.cpp +++ b/src/hardware/mixer.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mixer.cpp,v 1.44 2007-01-08 19:45:40 qbix79 Exp $ */ +/* $Id: mixer.cpp,v 1.45 2007-05-01 18:57:19 c2woody Exp $ */ /* Remove the sdl code from here and have it handeld in the sdlmain. @@ -429,7 +429,7 @@ static void MIXER_CallBack(void * userdata, Uint8 *stream, int len) { } /* Reduce done count in all channels */ for (MixerChannel * chan=mixer.channels;chan;chan=chan->next) { - if (chan->done>need) chan->done-=reduce; + if (chan->done>reduce) chan->done-=reduce; else chan->done=0; }