QTfrontend/SDLs.cpp
changeset 2399 ddde0ac1472b
parent 2392 a55dbef5cf31
child 2402 edd12b259e7c
--- a/QTfrontend/SDLs.cpp	Sun Sep 27 20:25:49 2009 +0000
+++ b/QTfrontend/SDLs.cpp	Sun Sep 27 22:25:27 2009 +0000
@@ -21,11 +21,12 @@
 #include "SDL.h"
 #include "hwconsts.h"
 
-SDLInteraction::SDLInteraction()
+SDLInteraction::SDLInteraction(bool hardware_snd)
 {
 	music = -1;
 
 	SDL_Init(SDL_INIT_VIDEO);
+        openal_init(hardware_snd ? 1 : 0, 5);
 
 }
 
@@ -56,10 +57,9 @@
 	return result;
 }
 
-void SDLInteraction::StartMusic(bool hardware)
+void SDLInteraction::StartMusic()
 {
 	if (music < 0) {
-		openal_init(hardware ? 1 : 0, 5);
 		music = openal_loadfile(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
 		openal_toggleloop(music);