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:
arpi 2002-12-04 22:01:59 +00:00
parent 930cfcdbe2
commit 61ecf838f2
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}