1
0
Fork 0

Fix 4-bit adpcm transfers from doing extra dma tranfers causing sounds to play to fast

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1772
This commit is contained in:
Sjoerd van der Berg 2004-04-21 08:21:47 +00:00
parent c1a88974e0
commit 2bccfd7a22

View file

@ -390,9 +390,6 @@ static void GenerateDMASound(Bitu size) {
sb.adpcm.stepsize=MIN_ADAPTIVE_STEP_SIZE;
skip++;read--;
}
if (sb.dma.left<size) size=sb.dma.left;
read=sb.dma.chan->Read(size,sb.dma.buf.b8);
sb.dma.left-=read;
for (i=0;i<read;i++) {
sb.tmp.buf.m[done++]=decode_ADPCM_4_sample(sb.dma.buf.b8[skip+i] >> 4,sb.adpcm.reference,sb.adpcm.stepsize);
sb.tmp.buf.m[done++]=decode_ADPCM_4_sample(sb.dma.buf.b8[skip+i]& 0xf,sb.adpcm.reference,sb.adpcm.stepsize);