diff src/audio/dsp/SDL_dspaudio.c @ 3817:103bbe13f5eb SDL-ryan-multiple-audio-device

Patched to compile.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 06 Oct 2006 04:49:48 +0000
parents 9d070c1a45fa
children 1f156fd874fa
line wrap: on
line diff
--- a/src/audio/dsp/SDL_dspaudio.c	Fri Oct 06 04:46:58 2006 +0000
+++ b/src/audio/dsp/SDL_dspaudio.c	Fri Oct 06 04:49:48 2006 +0000
@@ -140,6 +140,24 @@
 }
 
 
+static void
+DSP_CloseDevice(_THIS)
+{
+    if (this->hidden != NULL) {
+        if (this->hidden->mixbuf != NULL) {
+            SDL_FreeAudioMem(this->hidden->mixbuf);
+            this->hidden->mixbuf = NULL;
+        }
+        if (this->hidden->audio_fd >= 0) {
+            close(this->hidden->audio_fd);
+            this->hidden->audio_fd = -1;
+        }
+        SDL_free(this->hidden);
+        this->hidden = NULL;
+    }
+}
+
+
 static int
 DSP_OpenDevice(_THIS, const char *devname, int iscapture)
 {
@@ -352,23 +370,6 @@
     return (this->hidden->mixbuf);
 }
 
-static void
-DSP_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        if (this->hidden->mixbuf != NULL) {
-            SDL_FreeAudioMem(this->hidden->mixbuf);
-            this->hidden->mixbuf = NULL;
-        }
-        if (this->hidden->audio_fd >= 0) {
-            close(this->hidden->audio_fd);
-            this->hidden->audio_fd = -1;
-        }
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
 static int
 DSP_Init(SDL_AudioDriverImpl *impl)
 {