Refinement of the checks, so no IRQ is raised when not in autodma mode.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4307
This commit is contained in:
parent
dbd6be2da0
commit
51aecb14c6
1 changed files with 3 additions and 1 deletions
|
@ -294,7 +294,9 @@ static void DSP_DMA_CallBack(DmaChannel * chan, DMAEvent event) {
|
|||
if (!min_size) min_size = 1;
|
||||
min_size *= 2;
|
||||
if (sb.dma.left > min_size) {
|
||||
if (s > (sb.dma.left-min_size)) s = sb.dma.left - min_size;
|
||||
if (s > (sb.dma.left - min_size)) s = sb.dma.left - min_size;
|
||||
//This will trigger a irq, see GenerateDMASound, so lets not do that
|
||||
if (!sb.dma.autoinit && sb.dma.left <= sb.dma.min) s = 0;
|
||||
if (s) GenerateDMASound(s);
|
||||
}
|
||||
sb.mode = MODE_DMA_MASKED;
|
||||
|
|
Loading…
Add table
Reference in a new issue