Protection against overflowing the realsound buffer
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@315
This commit is contained in:
parent
fea2b58d8f
commit
4c8ce66c86
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ void PCSPEAKER_SetCounter(Bitu cntr,Bitu mode) {
|
|||
case 0:
|
||||
if (cntr>72) cntr=72;
|
||||
spkr.realsound=true;
|
||||
spkr.buffer[spkr.buf_pos++]=(cntr-36)*600;
|
||||
if (spkr.buf_pos<SPKR_BUF) spkr.buffer[spkr.buf_pos++]=(cntr-36)*600;
|
||||
break;
|
||||
case 3:
|
||||
spkr.freq_add=(Bit32u)(FREQ_MAX/((float)SPKR_RATE/(PIT_TICK_RATE/(float)cntr)));
|
||||
|
|
Loading…
Add table
Reference in a new issue