[MPlayer-dev-eng] ao_plugin assumption about ao driver play()

Stephen Davies steve at daviesfam.org
Mon Dec 10 00:53:27 CET 2001


On Mon, 10 Dec 2001, Arpi wrote:

> Steve wrote:
> > It certainly isn't for 6 channel audio where mplayer.c sometimes calls
> > ao_plugin with len=65536, not even a multiple of 6 samples...?

65536 is MAX_OUTBURST.  Perhaps MAX_OUTBURST should be made 65520 rather,
which is a size that will fit exactly 2, 4 or 6 channels of 1, 2 or 4 byte
samples.

> RTFS says:
> 
>   playsize=audio_out->play(sh_audio->a_buffer,playsize,0);
> 
>   if(playsize>0){
>       sh_audio->a_buffer_len-=playsize;
> 	memcpy(sh_audio->a_buffer,&sh_audio->a_buffer[playsize],sh_audio->a_buffer
> 	sh_audio->timer+=playsize/(float)(sh_audio->o_bps);
>   }

Well - ao_plugin will need to do similar sort of buffering.  Once its
passed a buffer full of data through the plugins, it has to get it out the
output driver, and can't re-process the same data again through the
plugins due to internal state that the plugins keep.

I think Anders is away on vacation - I'll try to fix this tomorrow.

Steve





More information about the MPlayer-dev-eng mailing list