src/audio/bsd/SDL_bsdaudio.c
changeset 9393 ed79a66e57e5
parent 8149 681eb46b8ac4
child 9394 bb28e5281770
--- a/src/audio/bsd/SDL_bsdaudio.c	Wed Mar 18 10:09:39 2015 -0400
+++ b/src/audio/bsd/SDL_bsdaudio.c	Mon Mar 16 02:11:39 2015 -0400
@@ -150,7 +150,7 @@
                the user know what happened.
              */
             fprintf(stderr, "SDL: %s\n", message);
-            this->enabled = 0;
+            SDL_AudioDeviceDisconnected(SDL_FALSE, 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) {
-        this->enabled = 0;
+        SDL_AudioDeviceDisconnected(SDL_FALSE, this);
     }
 #ifdef DEBUG_AUDIO
     fprintf(stderr, "Wrote %d bytes of audio data\n", written);