comparison src/audio/SDL_audio.c @ 4044:009d85e98922 SDL-1.2

Fixed VC++ warnings
author Sam Lantinga <slouken@libsdl.org>
date Wed, 11 Jul 2007 05:55:10 +0000
parents 000a99b4be87
children a1b03ba2fcd0
comparison
equal deleted inserted replaced
4043:5c890883360f 4044:009d85e98922
435 desired->format = AUDIO_S16; 435 desired->format = AUDIO_S16;
436 } 436 }
437 if ( desired->channels == 0 ) { 437 if ( desired->channels == 0 ) {
438 env = SDL_getenv("SDL_AUDIO_CHANNELS"); 438 env = SDL_getenv("SDL_AUDIO_CHANNELS");
439 if ( env ) { 439 if ( env ) {
440 desired->channels = SDL_atoi(env); 440 desired->channels = (Uint8)SDL_atoi(env);
441 } 441 }
442 } 442 }
443 if ( desired->channels == 0 ) { 443 if ( desired->channels == 0 ) {
444 /* Pick a default number of channels */ 444 /* Pick a default number of channels */
445 desired->channels = 2; 445 desired->channels = 2;
455 return(-1); 455 return(-1);
456 } 456 }
457 if ( desired->samples == 0 ) { 457 if ( desired->samples == 0 ) {
458 env = SDL_getenv("SDL_AUDIO_SAMPLES"); 458 env = SDL_getenv("SDL_AUDIO_SAMPLES");
459 if ( env ) { 459 if ( env ) {
460 desired->samples = SDL_atoi(env); 460 desired->samples = (Uint16)SDL_atoi(env);
461 } 461 }
462 } 462 }
463 if ( desired->samples == 0 ) { 463 if ( desired->samples == 0 ) {
464 /* Pick a default of ~46 ms at desired frequency */ 464 /* Pick a default of ~46 ms at desired frequency */
465 int samples = (desired->freq / 1000) * 46; 465 int samples = (desired->freq / 1000) * 46;