[pulseaudio-discuss] PA_STREAM_ADJUST_LATENCY with Simple API?

Cristian Morales Vega christian.morales.vega at gmail.com
Tue May 26 16:34:09 PDT 2009


2009/5/27 Lennart Poettering <lennart at poettering.net>:
> On Sat, 23.05.09 03:32, Cristian Morales Vega (cmorve69 at yahoo.es) wrote:
>
>> Hi,
>>
>> I just wanted to know if there is a way to use the
>> PA_STREAM_ADJUST_LATENCY flag using the simple API.
>> I see that pa_simple_new() has a parameter for pa_buffer_attr, but no
>> for pa_stream_flags_t. Why I would want to specify the server buffer
>> size? I only want to specify the size because of the latency, isn't
>> that the common case? Perhaps PA_STREAM_ADJUST_LATENCY is the default
>> when using the simple API?
>
> Hmm, it currently is not the default.
>
> However I guess it makes sense to make it the default, even if that
> might be considered API breakage. But I guess that kind of breakage
> doesn't really count since the usefulness of the attr argument is not
> really given without the flag set.
>
> I have now made this the default int PA git.

Ok, thanks.

>> The app is a game console emulator. It doesn't needs anything special,
>> only a low latency so video and audio are in sync.
>
> Hmm? For audio/video in sync you don't need low latency. All you need
> is accurate latency measurements. Which PA provides.

Well, isn't the same case than a video player. What do you suggests?
Delaying the video to whatever audio delay I have? In this case that
isn't possible. The "future video" isn't deterministic, depends on
what the user does (jump, fire, whatever), and the user will not do
anything until he sees the image to which he has to react. So an
unsync between audio and video is unavoidable... but it can be "low".



More information about the pulseaudio-discuss mailing list