comparison src/audio/SDL_audio.c @ 1903:f132024010be

More of the Direct3D renderer is implemented, I'm not sure why it's not showing texture copies yet...
author Sam Lantinga <slouken@libsdl.org>
date Fri, 14 Jul 2006 06:40:53 +0000
parents f1828a500391
children 8f1ab2f7c722
comparison
equal deleted inserted replaced
1902:eb2891493b66 1903:f132024010be
495 desired->format = AUDIO_S16; 495 desired->format = AUDIO_S16;
496 } 496 }
497 if (desired->channels == 0) { 497 if (desired->channels == 0) {
498 env = SDL_getenv("SDL_AUDIO_CHANNELS"); 498 env = SDL_getenv("SDL_AUDIO_CHANNELS");
499 if (env) { 499 if (env) {
500 desired->channels = (Uint8)SDL_atoi(env); 500 desired->channels = (Uint8) SDL_atoi(env);
501 } 501 }
502 } 502 }
503 if (desired->channels == 0) { 503 if (desired->channels == 0) {
504 /* Pick a default number of channels */ 504 /* Pick a default number of channels */
505 desired->channels = 2; 505 desired->channels = 2;
515 return (-1); 515 return (-1);
516 } 516 }
517 if (desired->samples == 0) { 517 if (desired->samples == 0) {
518 env = SDL_getenv("SDL_AUDIO_SAMPLES"); 518 env = SDL_getenv("SDL_AUDIO_SAMPLES");
519 if (env) { 519 if (env) {
520 desired->samples = (Uint16)SDL_atoi(env); 520 desired->samples = (Uint16) SDL_atoi(env);
521 } 521 }
522 } 522 }
523 if (desired->samples == 0) { 523 if (desired->samples == 0) {
524 /* Pick a default of ~46 ms at desired frequency */ 524 /* Pick a default of ~46 ms at desired frequency */
525 int samples = (desired->freq / 1000) * 46; 525 int samples = (desired->freq / 1000) * 46;