Ok. In order to avoid these problems I went for something like you have proposed in a first time Nicolas :
- DMA in loop mode
- 3 buffers
- chain assignments of dma start / end adresses on buffers (1, 2, 3, 1, 2, 3...) at a point later where I am sure new adresses have been acquired by dma
- monitor read cursor to determine if I need to render a 1000 or 1002 samples on the next frame
- and tune dma end address accordingly
I have something working in C under Hatari. No click, no lag...
Need to port this in ASM now