Fwd: [LOW LATENCY] PA_simple

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

 



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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160113/9f5c2859/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