On 28/01/2023 09:03, Volker Rümelin wrote:

Am 22.01.23 um 19:13 schrieb Mark Cave-Ayland:
On 15/01/2023 13:45, Volker Rümelin wrote:

Am 15.01.23 um 14:08 schrieb Volker Rümelin:

Ccing a few more people who might be interested in this patch series.

@Mark:
After this patch series, the code in your out of tree ASC audio device (and a few in tree audio devices) could be simplified. write_audio() and the loops calling write_audio() could be removed.

Hi Volker,

I know we have discussed this in a separate thread off-list, but this is 
fantastic!

Just out of interest, if the available bytes wraps the circular buffer will the audio core call the audio callback twice to maximise the ability of the guest to generate samples before the next audio timer? Or does that not make much difference in practice?

Hi Mark,

I guess with circular buffer you refer to the mixing engine buffer. The audio system calls the callback once on every audio timer event. If the available bytes wrap the mixing engine ringbuffer, the audio_pcm_sw_resample_out() function uses two writes to write all available bytes. Compared to the unpatched version, nothing has changed in this regard. Of course the audio frontend devices are still free to write 'avail' bytes with multiple calls to AUD_write().

With best regards,
Volker

Yes that makes sense, thanks for confirming this. I'm sorry that I'm not familiar enough with the audio side to do a proper review but obviously the A-B still stands and I would certainly be keen to see this merged.


ATB,

Mark.

Reply via email to