mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01: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:
parent
930cfcdbe2
commit
61ecf838f2
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user