comparison src/audio/SDL_audio.c @ 3798:c8b3d3d13ed1 SDL-ryan-multiple-audio-device

Audio bootstraps can now specify that a driver is only to be used if explicitly requested (for things like the "disk" driver that is always available but you would never want to default to using). Trimmed out code that can be handled by stubs in the core. The "dummy" driver is pretty damned small now. :)
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 04 Oct 2006 21:27:53 +0000
parents b19680c84cdf
children e17a59e6aff6
comparison
equal deleted inserted replaced
3797:9dc81c6acaf5 3798:c8b3d3d13ed1
478 break; 478 break;
479 } 479 }
480 } 480 }
481 } else { 481 } else {
482 for (i = 0; (!initialized) && (bootstrap[i]); ++i) { 482 for (i = 0; (!initialized) && (bootstrap[i]); ++i) {
483 if (bootstrap[i]->available()) { 483 if ((!bootstrap[i]->demand) && (bootstrap[i]->available())) {
484 SDL_memset(&current_audio, 0, sizeof (current_audio)); 484 SDL_memset(&current_audio, 0, sizeof (current_audio));
485 current_audio.name = bootstrap[i]->name; 485 current_audio.name = bootstrap[i]->name;
486 current_audio.desc = bootstrap[i]->desc; 486 current_audio.desc = bootstrap[i]->desc;
487 initialized = bootstrap[i]->init(&current_audio.impl); 487 initialized = bootstrap[i]->init(&current_audio.impl);
488 } 488 }