--- a/QTfrontend/SDLs.cpp Mon Aug 25 18:30:06 2008 +0000
+++ b/QTfrontend/SDLs.cpp Fri Aug 29 19:40:37 2008 +0000
@@ -23,12 +23,13 @@
SDLInteraction::SDLInteraction()
{
+ music = NULL;
+
SDL_Init(SDL_INIT_VIDEO);
SDL_Init(SDL_INIT_AUDIO);
Mix_OpenAudio(22050, 0x8010, 2, 512);
- Mix_Volume(-1, 50);
- music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toAscii().constData());
+ Mix_VolumeMusic(50);
}
SDLInteraction::~SDLInteraction()
@@ -58,6 +59,9 @@
}
void SDLInteraction::StartMusic()
{
+ if (!music)
+ music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toAscii().constData());
+
Mix_FadeInMusic(music, -1, 3000);
}