[MPlayer-dev-eng] [PATCH] dsound fix

Sascha Sommer saschasommer at freenet.de
Mon Mar 7 18:17:15 CET 2005


Hi,

On Wednesday 02 March 2005 02:44, Nehal wrote:
> ao dsound repeats the buffer if audio ends before video, this
> patch fixes it
>
> NOTE: the audio counter output is still wrong at the end (with
> this patch it stops increasing when the buffer is no longer
> filled, not when it stops playing), but at least it plays
> correctly now

I don't think this patch is the right thing todo, but I don't know a better  
fix, yet. Maybe it is better to uninit the audio device when the end of the 
audio stream is reached. However this might give sync problems with the audio 
out devices that block until the buffer is completely played. Another idea 
would be a new stop function that would play until the end of the buffer is 
reached. With your patch I'm not sure if MPlayer does not call play with 
len=0 during the normal plabyback phase, when for example a broken audio 
frame is detected. Any other ideas? Maybe we shouldn't create a looping 
ringbuffer at all and instead call IDirectSound_Play after every written 
block? The only difficulty seems to be to place the cursor at the beginning 
when the end of the ringbuffer is reached, then.

Sascha




More information about the MPlayer-dev-eng mailing list