[AD] [ alleg-Bugs-2686785 ] extreme lag in audio streams

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2686785, was opened at 2009-03-14 17:45
Message generated for change (Settings changed) made by tjaden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2686785&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 4.9
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Peter Wang (tjaden)
Assigned to: Nobody/Anonymous (nobody)
Summary: extreme lag in audio streams

Initial Comment:
ex_stream_seek demonstrates extremely bad lagging in sound output (playback is quite far behind where the position marker says it should be). It could just be a too big sound buffer.

Elias reported this, and I can reproduce it on my laptop with both ALSA/OSS drivers.



----------------------------------------------------------------------

>Comment By: Peter Wang (tjaden)
Date: 2009-08-06 20:14

Message:
The latency was due to using large buffers in ex_stream_seek.

----------------------------------------------------------------------

Comment By: Milan Mimica (mmimica)
Date: 2009-03-15 02:36

Message:
The lag you can hear when pausing the stream by altering the mixer (the way
ex_stream_seek does it) is not caused by stream buffers. This is inevitable
and it is really short here. I guess mixer does some buffering too.

The al_get_stream_position()/al_seek_stream() do not get/set the playing
position, only the position in the file descriptor. Something could be done
on that field.

----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2009-03-15 01:35

Message:
It's about a second here as well. However, I'm now not entirely sure what
that example shows. The pause function I added later works almost
instantly, so audio lag per se isn't the problem. Maybe someone can write
another example which simply preloads the entire audio file passed on the
command line, and then shows the *currently played* position instead of the
"streamed" position. If that looks like it has no lag things are probably
fine.

----------------------------------------------------------------------

Comment By: Peter Wang (tjaden)
Date: 2009-03-14 20:07

Message:
Yes, approximately 1 second here as well.  To me, that's pretty extreme.


----------------------------------------------------------------------

Comment By: Milan Mimica (mmimica)
Date: 2009-03-14 19:49

Message:
How extreme is it? Some numbers please. ex_stream_seek uses 4*4kb=16kb
buffering. On a crappy 48kbit audio that's a third of a second + some
arbitrary audio system buffer( + IO buffer when reading a file?).

I get approximately 1 second lag in 700kbit song, which is too high, but
is it extreme?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2686785&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/