rnd-20001129-2-src
[rocksndiamonds.git] / src / sdl.c
index ddf1137deca11805b06f36b10306a2a4e09b5a66..6e4b781b0df5a63cbdfa5ffb73ebaf448e5f1605 100644 (file)
--- a/src/sdl.c
+++ b/src/sdl.c
@@ -183,7 +183,7 @@ inline void SDLDrawSimpleLine(SDL_Surface *surface, int from_x, int from_y,
                SDL_MapRGB(surface->format, color_r, color_g, color_b));
 }
 
-inline boolean SDLInitAudio(void)
+inline boolean SDLOpenAudio(void)
 {
   if (SDL_Init(SDL_INIT_AUDIO) < 0)
   {
@@ -203,4 +203,12 @@ inline boolean SDLInitAudio(void)
   return TRUE;
 }
 
+inline void SDLCloseAudio(void)
+{
+  Mix_HaltMusic();
+  Mix_HaltChannel(-1);
+
+  Mix_CloseAudio();
+}
+
 #endif /* TARGET_SDL */