equal
deleted
inserted
replaced
54 } |
54 } |
55 |
55 |
56 return result; |
56 return result; |
57 } |
57 } |
58 |
58 |
59 void SDLInteraction::StartMusic() |
59 void SDLInteraction::StartMusic(bool hardware) |
60 { |
60 { |
61 if (music < 0) { |
61 if (music < 0) { |
62 openal_init(5); |
62 openal_init(hardware ? 1 : 0, 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 } |
66 openal_setvolume(music, 60); |
67 openal_setvolume(music, 60); |
67 openal_fadein(music, 25); |
68 openal_fadein(music, 30); |
68 } |
69 } |
69 |
70 |
70 void SDLInteraction::StopMusic() |
71 void SDLInteraction::StopMusic() |
71 { |
72 { |
72 if (music >= 0) openal_fadeout(music, 40); |
73 if (music >= 0) openal_fadeout(music, 40); |