Last change
on this file since 3715 was
3512,
checked in by bensch, 20 years ago
|
orxonox/branches/soundEngine: modified, so it has some more c++ style
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[3508] | 1 | #ifndef SOUNDCONTROL_CLASS_H |
---|
| 2 | #define SOUNDCONTROL_CLASS_H |
---|
| 3 | |
---|
[3512] | 4 | #include "stdincl.h" |
---|
[3508] | 5 | #include <SDL/SDL_mixer.h> |
---|
| 6 | |
---|
| 7 | class SoundControl { |
---|
| 8 | public: |
---|
| 9 | ~SoundControl(); |
---|
| 10 | |
---|
| 11 | static SoundControl* getInstance(); |
---|
| 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 | static void handleKey(SDL_KeyboardEvent key); |
---|
| 29 | int main(int argc, char* argv[]); |
---|
| 30 | |
---|
[3509] | 31 | |
---|
| 32 | private: |
---|
| 33 | SoundControl(); |
---|
| 34 | void init(void); |
---|
| 35 | |
---|
| 36 | static SoundControl* singletonRef; |
---|
| 37 | |
---|
[3512] | 38 | bool isInit; |
---|
| 39 | |
---|
[3509] | 40 | public: |
---|
[3512] | 41 | |
---|
[3509] | 42 | Mix_Music* music; |
---|
[3508] | 43 | static SoundControl* sound; |
---|
[3509] | 44 | int bits; |
---|
[3508] | 45 | int volume; |
---|
[3512] | 46 | |
---|
[3508] | 47 | int track_number; |
---|
[3512] | 48 | int audio_rate; |
---|
| 49 | int audio_channels; |
---|
| 50 | int audio_buffers; |
---|
[3508] | 51 | int done; |
---|
| 52 | int sfx_channel1; |
---|
| 53 | int sfx_channel2; |
---|
| 54 | int finished; |
---|
[3512] | 55 | |
---|
| 56 | Uint16 audio_format; |
---|
[3508] | 57 | }; |
---|
| 58 | |
---|
| 59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.