Reply 580 of 596, by FreddyV
MobyGamer wrote on 2020-10-08, 01:34:
I wondered about the 2K buffer thing, because when I was looking at the docs I couldn't see that as a limit. The BIOS extensions for the DAC don't have that limit either, so glad that we were both mistaken on that. But it is a shame it does IRQ only at the end of a buffer, so we have to resort to SB 1.0 player tricks which are ugly.
I use a 50Hz Timer that read the DMA Buffer offset and execute the next 1/50Hz buffer calculation.
DMA Buffer offset is read after each buffer is mixed as well, to update the Volume cut value I use to speed up the mixing if the mix code is late.
Then, this is even more accurate and can be more precise that the Sound Blaster code.
Tandy DAC is working in Autoinit mode, so we only need to aknowledge the DAC IRQ.
This technique can be used for the Sound Blaster Not Autoinit, to reduce the number of time we need to "Restart" the DMA.
All the parameters are variables, (DMA Buffer size, Number of 1/50Hz buffer to compute with the minimum and maximum value and so on)