[pulseaudio-discuss] how to set buffer attributes in 0.9.15
sohail abbasi
sohail_aziz05 at yahoo.com
Thu Apr 21 22:48:34 PDT 2011
hi everyone,
I am stuck in the pulseaudio programing, I am adding pulseaudio support
in my existing application.Design of the application is synchronous and
multithreaded. I need exactly 320 samples (320*4 bytes) for reading
and writing. While using pulseaudio 0.9.14 , below parameters works
fine but with 0.9.15 readablesize is not as expecting :( . One more
thing , are playattributes and record attributes related to each other
or have any effect on one another ?
***************
PLAYBACK ATTRIBUTES:
play_attributes = (pa_buffer_attr*) malloc (sizeof (pa_buffer_attr));
play_attributes->maxlength = pa_usec_to_bytes(21*PA_USEC_PER_MSEC,&_sample_spec);
play_attributes->tlength = (uint32_t) -1;
play_attributes->prebuf = 0;
play_attributes->fragsize = pa_usec_to_bytes (20 * PA_USEC_PER_MSEC, &_sample_spec);
play_attributes->minreq = (uint32_t) -1;
****************
RECORD ATTRIBUTES:
record_attributes = (pa_buffer_attr*) malloc (sizeof (pa_buffer_attr));
record_attributes->maxlength = pa_usec_to_bytes (21 * PA_USEC_PER_MSEC, &_sample_spec);
record_attributes->tlength = (uint32_t) -1;
record_attributes->prebuf = (uint32_t) 0;
record_attributes->fragsize = pa_usec_to_bytes (20 * PA_USEC_PER_MSEC, &_sample_spec);
record_attributes->minreq =pa_usec_to_bytes(1*PA_USEC_PER_SEC,&_sample_spec);
I would be grateful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110421/d510c2ed/attachment.htm>
More information about the pulseaudio-discuss
mailing list