[MPlayer-dev-eng] [PATCH] Keep audio buffer for OSS

D Richard Felker III dalias at aerifal.cx
Wed Sep 1 17:10:24 CEST 2004


On Wed, Sep 01, 2004 at 01:43:28PM +0300, Ivan Kalvachev wrote:
> D Richard Felker III said:
> > On Mon, Aug 02, 2004 at 05:05:36PM +0200, Mikulas Patocka wrote:
> >> Hi
> >>
> >> audio_pause and audio_resume should keep data in audio buffer. However
> >> they don't do it for OSS audio driver. This causes problem that if the
> >> audio buffer is X seconds large, the movie skips X seconds forward on each
> >> pause/unpause operation.
> >>
> >> This patch fixes it --- it uses OSS trigger function (and falls back to
> >> old method if the driver doesn't support it), so that it audio data are
> >> being held in the buffer.
> >
> > This patch has a major problem!! It makes MPlayer keep the sound
> > device open while paused, so you can't just pause the movie/music to
> > let another program play audio. VERY BAD!!
> >
> > Rich
> 
> Rich I don't want to start an flame war, but you are wrong.

What do you mean I'm wrong? It's certainly true that with this patch
mplayer will keep the sound device open, and imo that's unacceptable.
If you insist on this functionality, have ao_oss keep its own copy of
submitted samples and resubmit them to the soundcard after reopening
after pause... Or just set the buffer down to a reasonable size.
There's no excuse for audio buffers being longer than 3-4x frametime
anyway.

Rich




More information about the MPlayer-dev-eng mailing list