summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-04 22:01:59 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-04 22:01:59 +0000
commit61ecf838f2775a0e51a6f941838821e2bcd7db9f (patch)
tree4043c15d0f1869285546a52ee2afa2da77767979
parent930cfcdbe2ed9be8f0998ab2a135116f570a1b86 (diff)
downloadmpv-61ecf838f2775a0e51a6f941838821e2bcd7db9f.tar.bz2
mpv-61ecf838f2775a0e51a6f941838821e2bcd7db9f.tar.xz
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> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8351 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libao2/ao_alsa1x.c2
-rw-r--r--libao2/ao_alsa9.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libao2/ao_alsa1x.c b/libao2/ao_alsa1x.c
index 5ed8f41ece..67f3ee3bd8 100644
--- a/libao2/ao_alsa1x.c
+++ b/libao2/ao_alsa1x.c
@@ -628,7 +628,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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 --git a/libao2/ao_alsa9.c b/libao2/ao_alsa9.c
index 5ed8f41ece..67f3ee3bd8 100644
--- a/libao2/ao_alsa9.c
+++ b/libao2/ao_alsa9.c
@@ -628,7 +628,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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);
}