Last change
on this file since 3508 was
3508,
checked in by bensch, 19 years ago
|
orxonox/branche/soundManager: added sound_control and it compiles
|
-
Property svn:executable set to
*
|
File size:
1020 bytes
|
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 | ~SoundControl(); |
---|
11 | |
---|
12 | static SoundControl* getInstance(); |
---|
13 | |
---|
14 | void setNumberOfChannels(int number_of_channels); |
---|
15 | static void playMod(char* filename); |
---|
16 | static void playWav(char* filename); |
---|
17 | static void playOgg(char* filename); |
---|
18 | void volumeUp(); |
---|
19 | void volumeDown(); |
---|
20 | void trackRewind(); |
---|
21 | void forwardMusic(); |
---|
22 | void rewindMusic(); |
---|
23 | void pauseMusic(); |
---|
24 | void resumeMusic(); |
---|
25 | void fadeInMusic(int time); |
---|
26 | void fadeOutMusic(int time); |
---|
27 | static void musicDone(); |
---|
28 | |
---|
29 | static void handleKey(SDL_KeyboardEvent key); |
---|
30 | int main(int argc, char* argv[]); |
---|
31 | |
---|
32 | static SoundControl* sound; |
---|
33 | int volume; |
---|
34 | int track_number; |
---|
35 | int audio_rate, audio_channels, audio_buffers; |
---|
36 | int done; |
---|
37 | Uint16 audio_format; |
---|
38 | int sfx_channel1; |
---|
39 | int sfx_channel2; |
---|
40 | int finished; |
---|
41 | |
---|
42 | private: |
---|
43 | SoundControl(); |
---|
44 | |
---|
45 | static SoundControl* singletonRef; |
---|
46 | void initialise(); |
---|
47 | |
---|
48 | }; |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.