changeset 11511:6e580b901205

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.
author joey
date Sun, 23 Nov 2003 17:04:19 +0000
parents 3638adcfdcbd
children 4ff38d168c2f
files libao2/ao_win32.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_win32.c	Sun Nov 23 16:59:57 2003 +0000
+++ b/libao2/ao_win32.c	Sun Nov 23 17:04:19 2003 +0000
@@ -134,7 +134,7 @@
         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;