comparison include/SDL_audio.h @ 1660:8b9d79e7eacf SDL-1.3

Added API requested in bug #43: Added SDL_GetNumVideoDrivers() and SDL_GetVideoDriver(). Replaced SDL_VideoDriverName() with SDL_GetCurrentVideoDriver() Added SDL_GetNumAudioDrivers() and SDL_GetAudioDriver(). Replaced SDL_AudioDriverName() with SDL_GetCurrentAudioDriver()
author Sam Lantinga <slouken@libsdl.org>
date Sat, 20 May 2006 04:35:58 +0000
parents c71e05b4dc2e
children 782fd950bd46
comparison
equal deleted inserted replaced
1659:14717b52abc0 1660:8b9d79e7eacf
93 } SDL_AudioCVT; 93 } SDL_AudioCVT;
94 94
95 95
96 /* Function prototypes */ 96 /* Function prototypes */
97 97
98 /* These functions return the list of built in video drivers, in the
99 * order that they are normally initialized by default.
100 */
101 extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
102 extern DECLSPEC const char * SDLCALL SDL_GetAudioDriver(int index);
103
98 /* These functions are used internally, and should not be used unless you 104 /* These functions are used internally, and should not be used unless you
99 * have a specific need to specify the audio driver you want to use. 105 * have a specific need to specify the audio driver you want to use.
100 * You should normally use SDL_Init() or SDL_InitSubSystem(). 106 * You should normally use SDL_Init() or SDL_InitSubSystem().
101 */ 107 */
102 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name); 108 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
103 extern DECLSPEC void SDLCALL SDL_AudioQuit(void); 109 extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
104 110
105 /* This function fills the given character buffer with the name of the 111 /* This function returns the name of the current audio driver, or NULL
106 * current audio driver, and returns a pointer to it if the audio driver has 112 * if no driver has been initialized.
107 * been initialized. It returns NULL if no driver has been initialized. 113 */
108 */ 114 extern DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
109 extern DECLSPEC char * SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
110 115
111 /* 116 /*
112 * This function opens the audio device with the desired parameters, and 117 * This function opens the audio device with the desired parameters, and
113 * returns 0 if successful, placing the actual hardware parameters in the 118 * returns 0 if successful, placing the actual hardware parameters in the
114 * structure pointed to by 'obtained'. If 'obtained' is NULL, the audio 119 * structure pointed to by 'obtained'. If 'obtained' is NULL, the audio