Mercurial > sdl-ios-xcode
comparison test/testaudioinfo.c @ 3795:589bc3d060cd SDL-ryan-multiple-audio-device
More 1.3 audio work...moved dsp and dma drivers over to new model. Untested!
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 04 Oct 2006 06:00:10 +0000 |
parents | 866c310e2cb5 |
children | 7dc7327cd626 |
comparison
equal
deleted
inserted
replaced
3794:db24e43972ac | 3795:589bc3d060cd |
---|---|
3 static void print_devices(int iscapture) | 3 static void print_devices(int iscapture) |
4 { | 4 { |
5 const char *typestr = ((iscapture) ? "capture" : "output"); | 5 const char *typestr = ((iscapture) ? "capture" : "output"); |
6 int n = SDL_GetNumAudioDevices(iscapture); | 6 int n = SDL_GetNumAudioDevices(iscapture); |
7 | 7 |
8 if (n == 0) | 8 printf("%s devices:\n", typestr); |
9 printf("No %s devices.\n\n", typestr); | 9 |
10 if (n == -1) | |
11 printf(" Driver can't detect specific devices.\n\n", typestr); | |
12 else if (n == 0) | |
13 printf(" No %s devices found.\n\n", typestr); | |
10 else | 14 else |
11 { | 15 { |
12 int i; | 16 int i; |
13 printf("%s devices:\n", typestr); | |
14 for (i = 0; i < n; i++) { | 17 for (i = 0; i < n; i++) { |
15 printf(" %s\n", SDL_GetAudioDeviceName(i, iscapture)); | 18 printf(" %s\n", SDL_GetAudioDeviceName(i, iscapture)); |
16 } | 19 } |
17 printf("\n"); | 20 printf("\n"); |
18 } | 21 } |