#include <stdio.h>
#include "SDL.h"
Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 41 of file testaudioinfo.c.
References i, print_devices(), SDL_GetAudioDriver, SDL_GetCurrentAudioDriver, SDL_GetError, SDL_GetNumAudioDrivers, SDL_Init, SDL_INIT_AUDIO, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, and SDL_Quit.
57 SDL_Log(
"No built-in audio drivers\n\n");
60 SDL_Log(
"Built-in audio drivers:\n");
61 for (i = 0; i <
n; ++
i) {
64 SDL_Log(
"Select a driver with the SDL_AUDIODRIVER environment variable.\n");
#define SDL_GetNumAudioDrivers
#define SDL_GetAudioDriver
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
#define SDL_LogSetPriority
#define SDL_GetCurrentAudioDriver
static void print_devices(int iscapture)
◆ print_devices()
static void print_devices |
( |
int |
iscapture | ) |
|
|
static |
Definition at line 16 of file testaudioinfo.c.
References i, NULL, SDL_GetAudioDeviceName, SDL_GetError, SDL_GetNumAudioDevices, and SDL_Log.
Referenced by main().
18 const char *typestr = ((iscapture) ?
"capture" :
"output");
21 SDL_Log(
"Found %d %s device%s:\n", n, typestr, n != 1 ?
"s" :
"");
24 SDL_Log(
" Driver can't detect specific %s devices.\n\n", typestr);
26 SDL_Log(
" No %s devices found.\n\n", typestr);
29 for (i = 0; i <
n; i++) {
#define SDL_GetNumAudioDevices
GLuint const GLchar * name
#define SDL_GetAudioDeviceName
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)