[MPlayer-dev-eng] ao_plugin assumption about ao driver play()
Anders Johansson
ajh at atri.curtin.edu.au
Mon Dec 10 03:53:04 CET 2001
Hi,
I think understand the problem, one solution could be this. Put this
code in ao_plugin->get_space().
sz=sz-sz%ao_plugin_data.trunc;
where trunc is a variable set by your plugin that needs buffer size
truncation. Do not add buffering to ao_plugin when we can use the one
in mplayer.
//Anders
>
>
> 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