12 Jan
2012
12 Jan
'12
10:50 p.m.
On Thu, Jan 12, 2012 at 09:44:11PM +0000, Jonathan Andrews wrote:
What I want to do is tell ALSA to hold a buffer of 3 of my packets (3 x 1024Bytes, thats 512 x 16 bit samples) while I feed extra packets (1K Byte, 512 samples per buffer) in for playback. The packets are arriving at roughly the correct rate, I just need a buffer to iron out any jitter in network transmit, do I have to do this myself ?
Unless data is arriving on average at *exactly* the sample rate of the ALSA device your buffering will sooner or later underrun or overrun. ALSA itself can't handle this use case, it requires adaptive resampling and it's not easy.
Ciao,
--
FA
Vor uns liegt ein weites Tal, die Sonne scheint - ein Glitzerstrahl.