# HG changeset patch
# User nemo
# Date 1242178208 0
# Node ID 8149802b4f149b338367e91556f1b7481abd6ec7
# Parent  243d363546e781ad5ae55a7344ead090e0eaad0a
only init music on use. workaround for audio bug.

diff -r 243d363546e7 -r 8149802b4f14 QTfrontend/SDLs.cpp
--- a/QTfrontend/SDLs.cpp	Tue May 12 15:17:49 2009 +0000
+++ b/QTfrontend/SDLs.cpp	Wed May 13 01:30:08 2009 +0000
@@ -26,10 +26,6 @@
 	music = NULL;
 
 	SDL_Init(SDL_INIT_VIDEO);
-	SDL_Init(SDL_INIT_AUDIO);
-	Mix_OpenAudio(22050, 0x8010, 2, 512);
-  
-	Mix_VolumeMusic(33);
 }
 
 SDLInteraction::~SDLInteraction()
@@ -60,7 +56,13 @@
 void SDLInteraction::StartMusic()
 {
 	if (!music)
+    {
+   	    SDL_Init(SDL_INIT_AUDIO);
+	    Mix_OpenAudio(22050, 0x8010, 2, 512);
+  
+	    Mix_VolumeMusic(33);
 		music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
+    }
 
 	Mix_FadeInMusic(music, -1, 3000);
 }