Mercurial > mplayer.hg
changeset 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 | 916d5392dcc9 |
children | 98146a490f2f |
files | libao2/ao_alsa1x.c libao2/ao_alsa9.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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); }