[MPlayer-cvslog] r25222 - trunk/libao2/ao_null.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Dec 1 10:56:36 CET 2007


Hello,
On Sat, Dec 01, 2007 at 02:39:39AM +0100, uau wrote:
[...]
>  static int init(int rate,int channels,int format,int flags){
>  
> -    ao_data.buffersize= 16384*channels;
> -    ao_data.outburst=512*channels;
> +    int samplesize = (format == AF_FORMAT_U8 || format == AF_FORMAT_S8) ? 1: 2;
> +    ao_data.outburst = 256 * channels * samplesize;
> +    // A "buffer" for about 0.2 seconds of audio
> +    ao_data.buffersize = (int)(rate * 0.2 / 256 + 1) * ao_data.outburst;

Ok, I admit that is quite a bit simpler than the code we usually have.

Greetings,
Reimar Döffinger



More information about the MPlayer-cvslog mailing list