equal
deleted
inserted
replaced
27 SDL_Init(SDL_INIT_AUDIO); |
27 SDL_Init(SDL_INIT_AUDIO); |
28 Mix_OpenAudio(22050, 0x8010, 2, 512); |
28 Mix_OpenAudio(22050, 0x8010, 2, 512); |
29 |
29 |
30 Mix_Volume(-1, 50); |
30 Mix_Volume(-1, 50); |
31 music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toAscii().constData()); |
31 music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toAscii().constData()); |
32 StartMusic(); |
|
33 } |
32 } |
34 |
33 |
35 SDLInteraction::~SDLInteraction() |
34 SDLInteraction::~SDLInteraction() |
36 { |
35 { |
37 SDL_Quit(); |
36 SDL_Quit(); |
57 |
56 |
58 return result; |
57 return result; |
59 } |
58 } |
60 void SDLInteraction::StartMusic() |
59 void SDLInteraction::StartMusic() |
61 { |
60 { |
62 Mix_PlayMusic(music, -1); |
61 Mix_FadeInMusic(music, -1, 3000); |
63 } |
62 } |
64 |
63 |
65 void SDLInteraction::StopMusic() |
64 void SDLInteraction::StopMusic() |
66 { |
65 { |
67 |
66 Mix_FadeOutMusic(2000); |
68 } |
67 } |