1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 10:32:15 +00:00

original config:

> ao_data.bps=channels*rate;
> if(format != AFMT_U8 && format != AFMT_S8)
>   ao_data.bps*=2;

fallback config, before patch:
> ao_data.bps=ao_data.channels * ao_data.samplerate;

since we forced the format to S16_LE in fallback, we should double bps
to be consistent with an original config of the same settings.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11512 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
joey 2003-11-23 17:04:19 +00:00
parent 86889fd4eb
commit 7afe24f691

View File

@ -134,7 +134,7 @@ static int init(int rate,int channels,int format,int flags)
ao_data.channels = wformat.nChannels = 2;
ao_data.samplerate = wformat.nSamplesPerSec = 44100;
ao_data.format = AFMT_S16_LE;
ao_data.bps=ao_data.channels * ao_data.samplerate;
ao_data.bps=ao_data.channels * ao_data.samplerate*2;
ao_data.buffersize=wformat.wBitsPerSample=16;
wformat.nBlockAlign = wformat.nChannels * (wformat.wBitsPerSample >> 3);
wformat.nAvgBytesPerSec = wformat.nSamplesPerSec * wformat.nBlockAlign;