Align SB16 DMA buffer size to 4 to avoid crash in 16-bit stereo mode.
This commit is contained in:
parent
be1baa295c
commit
63ab5ea24a
@ -1336,7 +1336,7 @@ void bx_sb16_c::dsp_dma(Bit8u command, Bit8u mode, Bit16u length, Bit8u comp)
|
||||
}
|
||||
}
|
||||
}
|
||||
DSP.dma.chunkcount = sampledatarate / 10; // 0.1 sec
|
||||
DSP.dma.chunkcount = (sampledatarate / 10 + 4) & ~3; // 0.1 sec + alignment to 4 (for 16-bit stereo)
|
||||
if (DSP.dma.chunkcount > BX_SOUNDLOW_WAVEPACKETSIZE) {
|
||||
DSP.dma.chunkcount = BX_SOUNDLOW_WAVEPACKETSIZE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user