Last change
on this file since 2979 was
2979,
checked in by simon, 20 years ago
|
/branches/sound/sound: Made a while(true) thing; music should play on m, sfx should play on a and s. You must put files named music.ogg, sfx1.wav and sfx2.wav in the sound folder. At the moment it does not compile out of unknown reasons (i don't understand the problems gcc has…).
|
-
Property svn:executable set to
*
|
File size:
792 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 | |
---|
10 | public: |
---|
11 | static SoundControl* getInstance(); |
---|
12 | static void deleteInstance(); |
---|
13 | void setNumberOfChannels(int number_of_channels); |
---|
14 | int playMod(char* filename); |
---|
15 | int playWav(char* filename); |
---|
16 | int 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 | static void musicDone(); |
---|
25 | int volume; |
---|
26 | int track_number; |
---|
27 | int audio_rate, audio_channels, audio_buffers; |
---|
28 | int done; |
---|
29 | Uint16 audio_format; |
---|
30 | |
---|
31 | protected: |
---|
32 | void initialise(); |
---|
33 | SoundControl(); |
---|
34 | ~SoundControl(); |
---|
35 | |
---|
36 | private: |
---|
37 | static SoundControl* instance; |
---|
38 | }; |
---|
39 | |
---|
40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.