Update of /cvsroot/mplayer/main/libao2 In directory mail:/var/tmp.root/cvs-serv14886 Modified Files: ao_sgi.c Log Message: A-V sync fix by Timo Kanera <timo@kanera.de>. Index: ao_sgi.c =================================================================== RCS file: /cvsroot/mplayer/main/libao2/ao_sgi.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ao_sgi.c 21 Mar 2003 16:42:50 -0000 1.3 +++ ao_sgi.c 30 Oct 2003 00:08:06 -0000 1.4 @@ -25,6 +25,8 @@ static ALconfig ao_config; static ALport ao_port; +static int sample_rate; +static int queue_size; // to set/get/query special features/parameters static int control(int cmd, void *arg){ @@ -54,7 +56,7 @@ } frate = rate; - + x[0].param = AL_RATE; x[0].value.ll = alDoubleToFixed(rate); x[1].param = AL_MASTER_CLOCK; @@ -76,7 +78,7 @@ if (frate != alFixedToDouble(x[0].value.ll)) { printf("ao_sgi, init: samplerate is now %lf (desired rate is %lf)\n", alFixedToDouble(x[0].value.ll), frate); } - + sample_rate = (int)frate; } ao_data.buffersize=131072; @@ -110,7 +112,7 @@ } // printf("ao_sgi, init: port %d config %d\n", ao_port, ao_config); - + queue_size = alGetQueueSize(ao_config); return 1; } @@ -181,8 +183,8 @@ // printf("ao_sgi, get_delay: (ao_buffersize %d)\n", ao_buffersize); - return 0; - + //return 0; + return (float)queue_size/((float)sample_rate); }
participants (1)
-
Diego Biurrun CVS