mirror of
https://github.com/mpv-player/mpv.git
synced 2026-06-06 20:10:30 +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 parent
930cfcdbe2
commit
61ecf838f2
2 files changed
+2
-2
No files matched your search
+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