Question about writable data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am using PulseAudio api to implement a scenario which synchronize an
input stream with  an output stream. Synchronize means that whenever input
data is available the same number of frames should be set for writing in
the output.

In order to achieve that I use two separate streams one for record and the
other for playback. In the record call back I check the writable size and
if it is big enough I write the data otherwise I reject the packet. This
causes some distortion in the output especially when latency is small.

Trying to overcome this problem I stopped checking for writable data. I use
pa_stream_begin_write instead before the pa_stream_write to allocated the
desired data size. This approach seems to work very well even for very
small latency, even when the reported writable size is zero.

My question is, if the approach above is safe and what is the actual
representation of the number returned from pa_stream_writable_size method?

Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20151230/2f984c24/attachment.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux