comparison src/audio/windib/SDL_dibaudio.c @ 2050:bbc89e09503f

Patched to compile again (thanks, Rasmus!).
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 18 Oct 2006 10:49:23 +0000
parents 5f6550e5184f
children 866052b01ee5
comparison
equal deleted inserted replaced
2049:5f6550e5184f 2050:bbc89e09503f
203 for (i = 0; i < NUM_BUFFERS; ++i) 203 for (i = 0; i < NUM_BUFFERS; ++i)
204 this->hidden->wavebuf[i].dwUser = 0xFFFF; 204 this->hidden->wavebuf[i].dwUser = 0xFFFF;
205 205
206 while ((!valid_datatype) && (test_format)) { 206 while ((!valid_datatype) && (test_format)) {
207 valid_datatype = 1; 207 valid_datatype = 1;
208 _this->spec.format = test_format; 208 this->spec.format = test_format;
209 switch (test_format) { 209 switch (test_format) {
210 case AUDIO_U8: 210 case AUDIO_U8:
211 case AUDIO_S16: 211 case AUDIO_S16:
212 case AUDIO_S32: 212 case AUDIO_S32:
213 break; /* valid. */ 213 break; /* valid. */
285 return 0; 285 return 0;
286 } 286 }
287 287
288 /* Create the sound buffers */ 288 /* Create the sound buffers */
289 this->hidden->mixbuf = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size); 289 this->hidden->mixbuf = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size);
290 if (mixbuf == NULL) { 290 if (this->hidden->mixbuf == NULL) {
291 WINWAVEOUT_CloseDevice(this); 291 WINWAVEOUT_CloseDevice(this);
292 SDL_OutOfMemory(); 292 SDL_OutOfMemory();
293 return 0; 293 return 0;
294 } 294 }
295 for (i = 0; i < NUM_BUFFERS; ++i) { 295 for (i = 0; i < NUM_BUFFERS; ++i) {