On Tue, 03 Aug 2021 09:26:38 +0200, Giuliano Zannetti - ART S.p.A. wrote: > (snip) > Could it be possible check for the first sample of the period only, as > reported in the code below? No, unfortunately your suggested optimization won't work reliably, I'm afraid. Each application may write samples partially, not always in period size. Also, the hardware may clear the buffer right after the hwptr is updated, and again, it's not always in period size. So, just checking the first sample doesn't guarantee the rest period size is also zero or non-zero. thanks, Takashi