diff libao2/ao_alsa9.c @ 8350:9e045c59ffb8

OK, I think I found why the alsa9 driver was breaking surround sound. ALSA returns the buffer size in _frames_, not bytes, so multiplying by bytes_per_sample is needed. patch by Tom Lees <tal26@cam.ac.uk>
author arpi
date Wed, 04 Dec 2002 22:01:59 +0000
parents 368019e0153a
children b8551709823d
line wrap: on
line diff
--- a/libao2/ao_alsa9.c	Wed Dec 04 22:00:03 2002 +0000
+++ b/libao2/ao_alsa9.c	Wed Dec 04 22:01:59 2002 +0000
@@ -628,7 +628,7 @@
 	  return(0);
 	}
       else {
-	ao_data.buffersize = err;
+	ao_data.buffersize = err * bytes_per_sample;
 	if (verbose>0)
 	  printf("alsa-init: got buffersize=%i\n", ao_data.buffersize);
       }