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

Anders Johansson ajh at atri.curtin.edu.au
Mon Dec 10 03:58:24 CET 2001


Hi,

There is no such assumption play checks how much space is available first,
RTFC

>>>	int tmp = get_space();
>>>	int ret_len =(tmp<len)?tmp:len;
  	/* Filter data */
 	ao_plugin_data.len=ret_len;  
 	ao_plugin_data.data=data;
	while(plugin(i))
   	  plugin(i++)->play();
  	/* Send data to output */
  	len=driver()->play(ao_plugin_data.data,ao_plugin_data.len,flags);

>>>	return ret_len;

driver()->play _will_ play what is sent to it cause I check how much
free space there is before I send data into it.

//Anders

> Hi,
> 
> Looking in ao_plugin, there's an assumption in its play() that ao2 drivers
> will always play all the data they are sent.
> 
> Or, perhaps, that mplayer.c will only call it with a number that is
> already a multiple of the frag size?
> 
> This isn't true, is it?
> 
> 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...?
> 
> Steve
> 
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list