Hello all,
we are using Pulse Audio API to playback audio received from network. So
far we are using pa_simple_api, with this we get latency of 2+ seconds.
>From internet documents we got to about PA_STREAM_ADJUST_LATENCY flags. But
it seem this flag can be set for PA_STREAM_API. We tried to set /use
PA_STREAM_API as mentioned below
. but it fails in
pa_stream_new
() it self.
pa_ml = pa_mainloop_new();
pa_mlapi = pa_mainloop_get_api(pa_ml);
pa_ctx = pa_context_new(pa_mlapi, "ivcloudapp");
pa_context_connect(pa_ctx, NULL,PA_CONTEXT_NOFLAGS, NULL);
if(!s)
{
s =
pa_stream_new(pa_ctx, "Playback", &ss, NULL);
if (!s) {
printf("pa_stream_new failed\n");
goto finish;
}
ret = 0;
paAttr.maxlength = pa_usec_to_bytes(latency,&ss);
paAttr.tlength = pa_usec_to_bytes(latency,&ss);
paAttr.prebuf = (uint32_t)-1;
paAttr.minreq = pa_usec_to_bytes(0,&ss)
;
paAttr.fragsize = (uint32_t)-1;
int r = pa_stream_connect_playback(s, NULL, &paAttr,
PA_STREAM_ADJUST_LATENCY, NULL, NULL);
Please give direction how we can set low latency with pa_simple_api.
Regards
+swapnali
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss