mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
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
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user