View Single Post
Old 30 October 2016, 13:44   #28
Toni Wilen
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 20,459
Originally Posted by meynaf View Post
Would it be possible to have an extra flag in the interrupt status byte that disables EXTER interrupt requests and only handles internal interrupt flag ?
This is for simple polling. For normal Amiga audio INTREQ bits can be read with the relevant interrupt disabled, but here we're not alone on EXTER...
That flag is only for enabling EXTER interrupt sources, it is not interrupt status flag (sample structure is never written by the emulator).

Check the hardware status register for pending interrupts. It is always valid, with or without enabled interrupts.

Another thing. What happens if the repeat addr/len are set but the sample has already stopped ? For example, sample is run, second buffer is filled and we then set the repeat... but we were too slow so the sample has already stopped.
This is to avoid buffer repetitions in case of overrun ; i set the sample with silent repeat, then fill the second buffer, then set the repeat. Therefore setting the repeat alone should start it immediately if nothing's currently being played.
I am not sure if I understood correctly but why not always set empty repeat (with very short size). This way sample never stops and you can write new updated repeat sample pointer and size when needed. (write sample pointer first, make sure first sample is same as previous "idle" sample to prevent pops if size write is delayed by one or more sample periods)
Toni Wilen is online now  
Page generated in 0.06819 seconds with 9 queries