Last change
on this file since 3500 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
|
Rev | Line | |
---|
[2793] | 1 | #ifndef SOUNDCONTROL_CLASS_H |
---|
| 2 | #define SOUNDCONTROL_CLASS_H |
---|
[2777] | 3 | |
---|
[2854] | 4 | #include "SDL/SDL.h" |
---|
| 5 | #include "SDL/SDL_mixer.h" |
---|
| 6 | #include <stdio.h> |
---|
[2777] | 7 | |
---|
[2793] | 8 | class SoundControl { |
---|
[2777] | 9 | public: |
---|
[2838] | 10 | static SoundControl* getInstance(); |
---|
| 11 | static void deleteInstance(); |
---|
[3179] | 12 | |
---|
[2854] | 13 | void setNumberOfChannels(int number_of_channels); |
---|
[3179] | 14 | static void playMod(char* filename); |
---|
| 15 | static void playWav(char* filename); |
---|
| 16 | static void playOgg(char* filename); |
---|
[2793] | 17 | void volumeUp(); |
---|
| 18 | void volumeDown(); |
---|
| 19 | void trackRewind(); |
---|
| 20 | void forwardMusic(); |
---|
| 21 | void rewindMusic(); |
---|
| 22 | void pauseMusic(); |
---|
| 23 | void resumeMusic(); |
---|
[3179] | 24 | void fadeInMusic(int time); |
---|
| 25 | void fadeOutMusic(int time); |
---|
[2854] | 26 | static void musicDone(); |
---|
[3179] | 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; |
---|
[2777] | 40 | |
---|
[3179] | 41 | protected: |
---|
[2815] | 42 | SoundControl(); |
---|
[2838] | 43 | ~SoundControl(); |
---|
[3179] | 44 | void initialise(); |
---|
[2838] | 45 | |
---|
[3179] | 46 | private: |
---|
[2838] | 47 | static SoundControl* instance; |
---|
[2854] | 48 | }; |
---|
[2838] | 49 | |
---|
[2777] | 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.