# HG changeset patch # User arpi # Date 1039039319 0 # Node ID 9e045c59ffb8f200f35e2091a96e3a9a6b788c2a # Parent 916d5392dcc907f182847675963780ee690fe068 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 diff -r 916d5392dcc9 -r 9e045c59ffb8 libao2/ao_alsa1x.c --- a/libao2/ao_alsa1x.c Wed Dec 04 22:00:03 2002 +0000 +++ b/libao2/ao_alsa1x.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); } diff -r 916d5392dcc9 -r 9e045c59ffb8 libao2/ao_alsa9.c --- 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); }