comparison libao2/ao_sdl.c @ 7660:7ff053498bf2

fill ao_data correctly
author arpi
date Mon, 07 Oct 2002 20:01:28 +0000
parents 0380dfad2db9
children 7674e94baff7
comparison
equal deleted inserted replaced
7659:b10df387019c 7660:7ff053498bf2
158 if(ao_subdevice) { 158 if(ao_subdevice) {
159 setenv("SDL_AUDIODRIVER", ao_subdevice, 1); 159 setenv("SDL_AUDIODRIVER", ao_subdevice, 1);
160 printf("SDL: using %s audio driver\n", ao_subdevice); 160 printf("SDL: using %s audio driver\n", ao_subdevice);
161 } 161 }
162 162
163 ao_data.channels=channels;
164 ao_data.samplerate=rate;
165 ao_data.format=format;
166
163 ao_data.bps=channels*rate; 167 ao_data.bps=channels*rate;
164 if(format != AFMT_U8 && format != AFMT_S8) 168 if(format != AFMT_U8 && format != AFMT_S8)
165 ao_data.bps*=2; 169 ao_data.bps*=2;
166 170
167 /* The desired audio format (see SDL_AudioSpec) */ 171 /* The desired audio format (see SDL_AudioSpec) */