On Sat, Jun 06, 2026 at 08:37:55PM +0200, Alexandre Ratchov wrote:
> This is the most flexible approach, imo. In a loop "pull" a block of
> data and send it to the device. In pseudo-code:
>
> while (1) {
> for (f = file_list; f != NULL; f = f->next) {
> read_samples(f, tmp_buf, par.round);
> mix_samples(out_buf, tmp_buf, par.round);
> }
> sio_write(hdl, out_buf, par.round * par.pchan * par.bps);
> }
>
> If all files use the same format, the code can be small and
> simple. Mixing is roughly adding the samples. It's even simpler if
> they are small and are pre-loaded in memory.
>
Thanks! This is very clear and helpful.
I've been looking at the aucat code, but this
helps me zero in. (it's a lot for me as a whole :P)
--
Paul W