12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
-
-
- #ifndef __OPENRAIDER_MONGOOSE_SOUND_H_
- #define __OPENRAIDER_MONGOOSE_SOUND_H_
-
-
- class Sound {
- public:
-
- typedef enum {
- SoundFlagsNone = 0,
- SoundFlagsLoop = 1
- } SoundFlags;
-
-
-
- Sound();
-
-
-
- ~Sound();
-
-
-
- int init();
-
-
-
- void listenAt(float pos[3], float angle[3]);
-
-
-
- void sourceAt(int source, float pos[3]);
-
-
-
- int addFile(char *filename, int *source, unsigned int flags);
-
-
-
- int addWave(unsigned char *wav, unsigned int length, int *source, unsigned int flags);
-
-
-
- void play(int source);
-
-
-
- void stop(int source);
-
- private:
- bool mInit;
- unsigned int mBuffer[256];
- unsigned int mSource[256];
- unsigned int mNextBuffer;
- unsigned int mNextSource;
- };
-
- #endif
|