diff 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
line wrap: on
line diff
--- a/include/SDL_audio.h	Wed May 17 08:18:28 2006 +0000
+++ b/include/SDL_audio.h	Sat May 20 04:35:58 2006 +0000
@@ -95,6 +95,12 @@
 
 /* Function prototypes */
 
+/* These functions return the list of built in video drivers, in the 
+ * order that they are normally initialized by default.
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
+extern DECLSPEC const char * SDLCALL SDL_GetAudioDriver(int index);
+
 /* These functions are used internally, and should not be used unless you
  * have a specific need to specify the audio driver you want to use.
  * You should normally use SDL_Init() or SDL_InitSubSystem().
@@ -102,11 +108,10 @@
 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
 extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
 
-/* This function fills the given character buffer with the name of the
- * current audio driver, and returns a pointer to it if the audio driver has
- * been initialized.  It returns NULL if no driver has been initialized.
+/* This function returns the name of the current audio driver, or NULL
+ * if no driver has been initialized.
  */
-extern DECLSPEC char * SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
+extern DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
 
 /*
  * This function opens the audio device with the desired parameters, and