diff options
author | Alexander Baldeck <alexander@archlinux.org> | 2004-09-29 07:46:01 +0000 |
---|---|---|
committer | Alexander Baldeck <alexander@archlinux.org> | 2004-09-29 07:46:01 +0000 |
commit | 55bb2e71ca2497e0f63b1917d4a5eb512f04a867 (patch) | |
tree | 50a66a042ce764383f3be75ad9d0c2502e0a4950 /src/sound/sound.h | |
parent | 92f7df43e255dda51f5ece57d2141645bd693afb (diff) | |
download | mana-55bb2e71ca2497e0f63b1917d4a5eb512f04a867.tar.gz mana-55bb2e71ca2497e0f63b1917d4a5eb512f04a867.tar.bz2 mana-55bb2e71ca2497e0f63b1917d4a5eb512f04a867.tar.xz mana-55bb2e71ca2497e0f63b1917d4a5eb512f04a867.zip |
added simple soundpool
Diffstat (limited to 'src/sound/sound.h')
-rw-r--r-- | src/sound/sound.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/sound/sound.h b/src/sound/sound.h index 4fbe3e45..4c5f13d5 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -1,4 +1,4 @@ -/** +/* The Mana World Copyright 2004 The Mana World Development Team @@ -36,6 +36,15 @@ #include <string> using namespace std; +/** mod file */ +#define TMWSOUND_MOD 1 +/** midi file */ +#define TMWSOUND_MID 2 +/** sample file */ +#define TMWSOUND_SFX 3 + +typedef unsigned short TMWSOUND_SID ; + /** rewrite of non-existend sdl-soundengine using allegro @@ -43,21 +52,11 @@ using namespace std; Author: kth5 aka Alexander Baldeck pipe your question, suggestions and flames to: kth5@gawab.com - - NOTE: - i documented all functions in their implementation. ;-) */ - -#define TMWSOUND_MOD 1 -#define TMWSOUND_MID 2 -#define TMWSOUND_SFX 3 - -typedef unsigned short TMWSOUND_SID ; - class TmwSound { public: void Init(int, int); - int Close(); + void Close(); void StartMIDI(char *, int); void StartMOD(char *, int); @@ -71,11 +70,11 @@ class TmwSound { TmwSound() {isOk=-1;} - /* if allegro is shut down or object is deleted any BGM is + /** if allegro is shut down or object is deleted any BGM is stopped and SFX run out */ ~TmwSound() {StopBGM(); Close();}; private: - /* initial value is -1 which means error or noninitialzed. + /** initial value is -1 which means error or noninitialzed. you can only play sounds and bgm if this is 0. that should be the case after calling Init() successfully */ int isOk; @@ -92,14 +91,15 @@ class TmwSound { int vol_midi; int vol_mod; + /** structure can hold a sound item's attributes and data (sample-only) */ typedef struct POOL_ITEM { - /* incremental id of pool item */ + /** incremental id of pool item */ TMWSOUND_SID id; - /* type of item */ + /** type of item */ char type; - /* (file-)name of sfx only kept for human reasons ^_^ */ + /** (file-)name of sfx only kept for human reasons ^_^ */ string fname; - /* generic data casted before used */ + /** generic data */ void * data; }; |