On Sunday 11 March 2018 11:50:00 fredvs wrote:

> About  pcaudiolib with Alsa driver active....
> With a samplerate = 44100 and a buffer = 44100 samples, logically it will
> take 1 second to write the buffer in mono.
> And for 3 seconds, 3x write the buffer by the loop.
> It is what appends in my test using pcaudio with linux-pulseaudio or
> windows, for int16, int32 and float32.
> But for alsa, the sound is ok for each resolution but to have 3 seconds of
> sound, there must be +-20 loops!

Not "must" but "can".

> Also the number of loops does not give a linear duration, it seems random
> and different for each resolution...
> Did you note that too ?
Yes, I already wrote about it.
Pulseaudio has definable latency time (the latency time is not accessible in 
pcaudiolib!), default is 100ms AFAIK.
When the latency time is filled by audio_object_write() the next 
audio_object_write() will block until the previous data has been written.
On Windows waveOUT pcaudiolib driver there are 4 buffers in order to hold 
audio_object_write() data. If all are used audio_object_write() blocks until 
the oldest buffer has been played and becomes free.
In Alsa audio_object_write() blocks after a big buffer of many seconds (I saw 
up to 30 seconds!) has been filled.


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
mseide-msegui-talk mailing list

Reply via email to