Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.

This commit is contained in:
Ryan C. Gordon
2006-10-17 09:15:21 +00:00
parent e475d47d2a
commit 7f17eb8863
69 changed files with 5090 additions and 5826 deletions

View File

@@ -69,26 +69,12 @@ main(int argc, char *argv[])
{
int i, n;
/* Print available audio drivers */
n = SDL_GetNumAudioDrivers();
if (n == 0) {
printf("No built-in audio drivers\n");
} else {
printf("Built-in audio drivers:");
for (i = 0; i < n; ++i) {
if (i > 0) {
printf(",");
}
printf(" %s", SDL_GetAudioDriver(i));
}
printf("\n");
}
/* Load the SDL library */
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
return (1);
}
if (argv[1] == NULL) {
argv[1] = "sample.wav";
}
@@ -120,7 +106,6 @@ main(int argc, char *argv[])
SDL_PauseAudio(0);
/* Let the audio run */
printf("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING))
SDL_Delay(1000);