src/audio/bsd/SDL_bsdaudio.c
changeset 9394 bb28e5281770
parent 9393 ed79a66e57e5
child 9619 b94b6d0bff0f
--- a/src/audio/bsd/SDL_bsdaudio.c	Mon Mar 16 02:11:39 2015 -0400
+++ b/src/audio/bsd/SDL_bsdaudio.c	Wed Mar 18 02:01:17 2015 -0400
@@ -51,9 +51,9 @@
 
 
 static void
-BSDAUDIO_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
+BSDAUDIO_DetectDevices(void)
 {
-    SDL_EnumUnixAudioDevices(iscapture, 0, NULL, addfn);
+    SDL_EnumUnixAudioDevices(0, NULL);
 }
 
 
@@ -150,7 +150,7 @@
                the user know what happened.
              */
             fprintf(stderr, "SDL: %s\n", message);
-            SDL_AudioDeviceDisconnected(SDL_FALSE, this);
+            SDL_OpenedAudioDeviceDisconnected(this);
             /* Don't try to close - may hang */
             this->hidden->audio_fd = -1;
 #ifdef DEBUG_AUDIO
@@ -195,7 +195,7 @@
 
     /* If we couldn't write, assume fatal error for now */
     if (written < 0) {
-        SDL_AudioDeviceDisconnected(SDL_FALSE, this);
+        SDL_OpenedAudioDeviceDisconnected(this);
     }
 #ifdef DEBUG_AUDIO
     fprintf(stderr, "Wrote %d bytes of audio data\n", written);
@@ -224,7 +224,7 @@
 }
 
 static int
-BSDAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
+BSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
 {
     const int flags = ((iscapture) ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT);
     SDL_AudioFormat format = 0;
@@ -348,6 +348,8 @@
     impl->GetDeviceBuf = BSDAUDIO_GetDeviceBuf;
     impl->CloseDevice = BSDAUDIO_CloseDevice;
 
+    impl->AllowsArbitraryDeviceNames = 1;
+
     return 1;   /* this audio target is available. */
 }