src/audio/SDL_audio.c
branchSDL-1.3
changeset 1660 8b9d79e7eacf
parent 1659 14717b52abc0
child 1662 782fd950bd46
--- a/src/audio/SDL_audio.c	Wed May 17 08:18:28 2006 +0000
+++ b/src/audio/SDL_audio.c	Sat May 20 04:35:58 2006 +0000
@@ -330,6 +330,19 @@
 	return format;
 }
 
+int SDL_GetNumAudioDrivers(void)
+{
+	return(SDL_arraysize(bootstrap)-1);
+}
+
+const char *SDL_GetAudioDriver(int index)
+{
+	if ( index >= 0 && index < SDL_GetNumAudioDrivers() ) {
+		return(bootstrap[index]->name);
+	}
+	return(NULL);
+}
+
 int SDL_AudioInit(const char *driver_name)
 {
 	SDL_AudioDevice *audio;
@@ -419,11 +432,10 @@
 	return(0);
 }
 
-char *SDL_AudioDriverName(char *namebuf, int maxlen)
+const char *SDL_GetCurrentAudioDriver()
 {
-	if ( current_audio != NULL ) {
-		SDL_strlcpy(namebuf, current_audio->name, maxlen);
-		return(namebuf);
+	if ( current_audio ) {
+		return current_audio->name;
 	}
 	return(NULL);
 }