equal
deleted
inserted
replaced
24 SDLInteraction::SDLInteraction() |
24 SDLInteraction::SDLInteraction() |
25 { |
25 { |
26 music = NULL; |
26 music = NULL; |
27 |
27 |
28 SDL_Init(SDL_INIT_VIDEO); |
28 SDL_Init(SDL_INIT_VIDEO); |
29 // SDL_Init(SDL_INIT_AUDIO); |
29 SDL_Init(SDL_INIT_AUDIO); |
30 // Mix_OpenAudio(22050, 0x8010, 2, 512); |
30 Mix_OpenAudio(22050, 0x8010, 2, 512); |
31 |
31 |
32 // Mix_VolumeMusic(33); |
32 Mix_VolumeMusic(33); |
33 } |
33 } |
34 |
34 |
35 SDLInteraction::~SDLInteraction() |
35 SDLInteraction::~SDLInteraction() |
36 { |
36 { |
37 SDL_Quit(); |
37 SDL_Quit(); |
57 |
57 |
58 return result; |
58 return result; |
59 } |
59 } |
60 void SDLInteraction::StartMusic() |
60 void SDLInteraction::StartMusic() |
61 { |
61 { |
62 /* |
|
63 if (!music) |
62 if (!music) |
64 music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData()); |
63 music = Mix_LoadMUS(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData()); |
65 |
64 |
66 Mix_FadeInMusic(music, -1, 3000); |
65 Mix_FadeInMusic(music, -1, 3000); |
67 */ |
|
68 } |
66 } |
69 |
67 |
70 void SDLInteraction::StopMusic() |
68 void SDLInteraction::StopMusic() |
71 { |
69 { |
72 // Mix_FadeOutMusic(2000); |
70 Mix_FadeOutMusic(2000); |
73 } |
71 } |