[MPlayer-dev-eng] [PATCH] audio file truncation

Clemens Ladisch clemens at ladisch.de
Tue Jun 6 18:03:44 CEST 2006


Uoti Urpala wrote:
> [...] This does raise a question though:
> if it's OK for the ao to play 0 bytes on this call, how do we
> distinguish cases where the ao will accept data later (presumably after
> some sound has played and buffers have emptied), and cases where it will
> never succeed in playing the remaining bytes (assuming this is a
> significant possibility)?

(USB device unplugged, network down, sound server killed, ...)

> Maybe the most reasonable thing to do is to require that the ao accept
> at least some of the data if it returned > 0 from get_space().

My understanding of the API is that play() guarantees to accept at least
as
much data as indicated by get_space().

Anyway, I think get_space() and/or play() should be extended to return a
negative value to indicate a fatal error.


Regards,
Clemens

-- 
http://www.fastmail.fm - Same, same, but different





More information about the MPlayer-dev-eng mailing list