[MPlayer-dev-eng] [PATCH] ao_sdl buffering change

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Oct 15 18:19:21 CEST 2004


Hi,

>>this is something I've been playing around with a bit. It doesn't make
>>too much sense except from a theoretical standpoint, but if you have
>>time please look at it and comment, test etc. anyway.
>>Currently ao_sdl uses a ringbuffer consisting of 8 seperate buffers, for
>>which I can't see any reason at all. In addition it isn't thread safe,
>>which it should be as SDL might use a different thread for playback of
>>the sound.
>>This implementation uses a type of ringbuffer that should provide enough
>>thread-safety for this special case while not requiring synchronization.
>>I'm not sure if this is more likely to increase or decrease performance,
>>I doubt there will be much change. Feel free to test if you want ;-)
> 
> Looks like as the cpu usage ,displayed in the status bar, is at least twice as 
> high with audio only files here. Otherwise it seems to work fine.

Could you try again? This patch should now provide the necessary 
thread-safety only at the expense of 4k RAM.

Greetings,
Reimar Döffinger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ao_sdl_buf.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20041015/2aaf7925/attachment.txt>


More information about the MPlayer-dev-eng mailing list