[MPlayer-dev-eng] [PATCH] short, low bitrate audio file playback

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Aug 22 17:40:40 CEST 2005


Hi,
On Mon, Aug 22, 2005 at 10:57:22AM -0400, Rich Felker wrote:
> On Mon, Aug 22, 2005 at 02:00:04PM +0200, Reimar Döffinger wrote:
> > the attached patch helps playing short audio file to the end by not only
> > waiting for the stream eof but also until the audio buffer is empty.
> > Is it okay to apply?
> 
> I'm not sure. IMO it should be the ao's responsibility to play all
> buffered audio at close time if the close is not user-requested.. But
> this may lead to worse responsiveness with large buffers. On the other
> hand I think it would give better results for making seamless gaps
> across multiple files, if something like -fixed-vo were supported for
> audio.

You're out of date. That was implemented even before I joined (though I
fixed/implemented it for a few aos).
This patch is about _decoding_, it is the in_buffer that is not empty,
meaning the decoder has read some bytes from the file but not yet
(completely) decoded them.
This happens mostly with binary codecs, since there we can't always make
precise estimations of how much data we must read to get maxlen decoded
bytes, so some are left over sometimes (actually the problem is so
extreme because the DS_Audio_Decoder_Convert function currently only
decodes 28 bytes per pass, but ad_dshow reads in 8k blocks, so we end up
loosing 8k. But I think it still should be fixed at this place as well).

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list