Solution for dropped sound samples.

Jeffrey W. Baker jwbaker at acm.org
Mon Oct 15 02:33:57 CEST 2001


It seems like vlc likes to live dangerously.  It needs to deliver 100ms
worth of audio every time it wakes up, so it sets a usleep timer for
100ms!  This doesn't take into account the amount of time actually spent
processing the audio output.  On my powerbook, this causes 10-20ms periods
of silence every 100ms.

I propose that instead of sleeping for a fixed amount of time, the audio
output routine should gettimeofday() before and after it sleeps.  The
sleep interval should be 100ms, minus the elapsed time, minus 10ms for
scheduling latency.

Sound OK?

-jwb





More information about the vlc-devel mailing list