[MPlayer-cvslog] r25940 - trunk/libao2/ao_openal.c

reimar subversion at mplayerhq.hu
Thu Jan 31 00:39:01 CET 2008


Author: reimar
Date: Thu Jan 31 00:39:01 2008
New Revision: 25940

Log:
Change code to also work with different outburst sizes

Modified:
   trunk/libao2/ao_openal.c

Modified: trunk/libao2/ao_openal.c
==============================================================================
--- trunk/libao2/ao_openal.c	(original)
+++ trunk/libao2/ao_openal.c	Thu Jan 31 00:39:01 2008
@@ -212,7 +212,7 @@ static int play(void *data, int len, int
   int i, j, k;
   int ch;
   int16_t *d = data;
-  len /= ao_data.outburst;
+  len /= ao_data.channels * CHUNK_SIZE;
   for (i = 0; i < len; i++) {
     for (ch = 0; ch < ao_data.channels; ch++) {
       for (j = 0, k = ch; j < CHUNK_SIZE / 2; j++, k += ao_data.channels)
@@ -227,7 +227,7 @@ static int play(void *data, int len, int
   alGetSourcei(sources[0], AL_SOURCE_STATE, &state);
   if (state != AL_PLAYING) // checked here in case of an underrun
     alSourcePlayv(ao_data.channels, sources);
-  return len * ao_data.outburst;
+  return len * ao_data.channels * CHUNK_SIZE;
 }
 
 static float get_delay(void) {



More information about the MPlayer-cvslog mailing list