comparison src/audio/SDL_audio.c @ 3786:b70f4e9291bb SDL-ryan-multiple-audio-device

High level now lets user select a specific audio device with an environment variable, when the app requested the default device.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 03 Oct 2006 16:02:08 +0000
parents 37c9c4590689
children 8d74a4721ca9
comparison
equal deleted inserted replaced
3785:da2ea0694d11 3786:b70f4e9291bb
568 return 0; 568 return 0;
569 } 569 }
570 570
571 if (!prepare_audiospec(_desired, &desired)) { 571 if (!prepare_audiospec(_desired, &desired)) {
572 return 0; 572 return 0;
573 }
574
575 /* If app doesn't care about a specific device, let the user override. */
576 if (devname == NULL) {
577 devname = SDL_getenv("SDL_AUDIO_DEVICE_NAME");
573 } 578 }
574 579
575 device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof (SDL_AudioDevice)); 580 device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof (SDL_AudioDevice));
576 if (device == NULL) { 581 if (device == NULL) {
577 SDL_OutOfMemory(); 582 SDL_OutOfMemory();