[MPlayer-dev-eng] [PATCH] smooth playback with NAS and all audio drivers

Sidik Isani lksi at cfht.hawaii.edu
Tue Sep 24 00:44:36 CEST 2002


On Tue, Sep 24, 2002 at 12:31:02AM +0200, Arpi wrote:
> Hi,
> 
> > >   o A new variable "delay_avg" stores either the last delay measurement
> > >     from audio_out->get_delay(), or a corrected one calculated by my
> > 
> > the problem is here.
> > you should not store the result of audio_out->get_delay(), it's variable in
> 
> rethinking your problem...
> 
> so, you have (and several ppl with broken sounddcard drivers) jerky values
> from the ao->get_delay().
> 
> my first thought was that just average this value, like this:

Hi -

  That was my thought too, and then I also realized that averaging the
  delay values is not the right thing to do.  The patch I came up with
  averages the *corrections* to time_frame, not the delay itself, so
  it does the right thing ... but ... what you write below is interesting
  too.  Let me think on it a bit tonight!  (There's another message
  coming that I was sending too, with some thoughts on frame dropping.)

> you should implement such code, calculating virtual audio position based on
> samplerate & real time clock, altered by play() amounts, and using it for
> get_delay(). it must be syncronized to the real driver, for example in teh
> fake get_delay() impl you can call the real get_delay(), calc & average teh
> difference between get-delay values, and correct the virtual timer by it.
> it should provide better result.
>
> A'rpi / Astral & ESP-team
> 
> --
> Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list