snd_dma, snd_mem and snd_mix
snd_dma, snd_mem and snd_mix
What are the purpose of those sound files? Is DMA really necessary?
Re: snd_dma, snd_mem and snd_mix
dma refers to direct hardware buffer memory access instead of having to make system calls to copy data via registers etc. whether this hardware buffer is emulated by the driver at some interval doesn't matter to quake.
with actual dma, you generally want to avoid reading back. with fake audio dma you probably still want to avoid rewriting the same sample multiple times (so your buffer is always valid tones, even if your mixer fell behind somehow).
snd_dma deals with channel management (with non-dma, you'd be probably programming the hardware to play mix whatever samples itself, like midi). decides per-channel volumes.
snd_mem handles .wav loading (with resampling).
snd_mix does the actual mixing. S_TransferPaintBuffer writes to the dma buffer.
with actual dma, you generally want to avoid reading back. with fake audio dma you probably still want to avoid rewriting the same sample multiple times (so your buffer is always valid tones, even if your mixer fell behind somehow).
snd_dma deals with channel management (with non-dma, you'd be probably programming the hardware to play mix whatever samples itself, like midi). decides per-channel volumes.
snd_mem handles .wav loading (with resampling).
snd_mix does the actual mixing. S_TransferPaintBuffer writes to the dma buffer.