QTfrontend/SDLs.cpp
changeset 2294 2e6ffb3ef304
parent 2213 bd51bbf06033
child 2392 a55dbef5cf31
equal deleted inserted replaced
2293:f8d488636828 2294:2e6ffb3ef304
    24 SDLInteraction::SDLInteraction()
    24 SDLInteraction::SDLInteraction()
    25 {
    25 {
    26 	music = -1;
    26 	music = -1;
    27 
    27 
    28 	SDL_Init(SDL_INIT_VIDEO);
    28 	SDL_Init(SDL_INIT_VIDEO);
    29 	openal_init(5);
       
    30 
    29 
    31 }
    30 }
    32 
    31 
    33 SDLInteraction::~SDLInteraction()
    32 SDLInteraction::~SDLInteraction()
    34 {
    33 {
    58 }
    57 }
    59 
    58 
    60 void SDLInteraction::StartMusic()
    59 void SDLInteraction::StartMusic()
    61 {
    60 {
    62 	if (music < 0) {
    61 	if (music < 0) {
       
    62 	    openal_init(5);
    63 		music = openal_loadfile(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
    63 		music = openal_loadfile(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
    64 		openal_toggleloop(music);
    64 		openal_toggleloop(music);
    65 	}
    65 	}
    66 	openal_setvolume(music, 60);
    66 	openal_setvolume(music, 60);
    67 	openal_fadein(music, 25);
    67 	openal_fadein(music, 25);