Last change
on this file since 3247 was
3179,
checked in by bensch, 20 years ago
|
orxonox/branches/sound: added files to source again, made it compile for widnows again.
Simon, if you arrive at a point where it is doing something usefull, we inject it into the trunk.
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #ifndef SOUNDCONTROL_CLASS_H |
---|
2 | #define SOUNDCONTROL_CLASS_H |
---|
3 | |
---|
4 | #include "SDL/SDL.h" |
---|
5 | #include "SDL/SDL_mixer.h" |
---|
6 | #include <stdio.h> |
---|
7 | |
---|
8 | class SoundControl { |
---|
9 | public: |
---|
10 | static SoundControl* getInstance(); |
---|
11 | static void deleteInstance(); |
---|
12 | |
---|
13 | void setNumberOfChannels(int number_of_channels); |
---|
14 | static void playMod(char* filename); |
---|
15 | static void playWav(char* filename); |
---|
16 | static void playOgg(char* filename); |
---|
17 | void volumeUp(); |
---|
18 | void volumeDown(); |
---|
19 | void trackRewind(); |
---|
20 | void forwardMusic(); |
---|
21 | void rewindMusic(); |
---|
22 | void pauseMusic(); |
---|
23 | void resumeMusic(); |
---|
24 | void fadeInMusic(int time); |
---|
25 | void fadeOutMusic(int time); |
---|
26 | static void musicDone(); |
---|
27 | |
---|
28 | void handleKey(SDL_KeyboardEvent key); |
---|
29 | int main(int argc, char* argv[]); |
---|
30 | |
---|
31 | static SoundControl* sound; |
---|
32 | int volume; |
---|
33 | int track_number; |
---|
34 | int audio_rate, audio_channels, audio_buffers; |
---|
35 | int done; |
---|
36 | Uint16 audio_format; |
---|
37 | int sfx_channel1; |
---|
38 | int sfx_channel2; |
---|
39 | int finished; |
---|
40 | |
---|
41 | protected: |
---|
42 | SoundControl(); |
---|
43 | ~SoundControl(); |
---|
44 | void initialise(); |
---|
45 | |
---|
46 | private: |
---|
47 | static SoundControl* instance; |
---|
48 | }; |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.