1
0
Fork 0

Take into account that speaker might be disabled in settings. Fixes bug #434.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3967
This commit is contained in:
ripsaw8080 2016-02-14 03:59:17 +00:00
parent 30db525521
commit 9035510f06

View file

@ -192,7 +192,7 @@ void PCSPEAKER_SetCounter(Bitu cntr,Bitu mode) {
spkr.pit_max=(1000.0f/PIT_TICK_RATE)*cntr;
break;
case 3: /* Square wave generator */
if (cntr<spkr.min_tr) {
if (cntr==0 || cntr<spkr.min_tr) {
/* skip frequencies that can't be represented */
spkr.pit_last=0;
spkr.pit_mode=0;