]> icculus.org git repositories - divverent/darkplaces.git/blob - snd_3dras.h
fix typo
[divverent/darkplaces.git] / snd_3dras.h
1 //BSD
2
3 #ifndef SND_3DRAS_H
4 #define SND_3DRAS_H
5
6 #include "sound.h"
7
8 #define DEFAULT_SOUND_PACKET_VOLUME 255
9 #define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
10
11 #define CHANNELFLAG_NONE                0
12 #define CHANNELFLAG_FORCELOOP   (1 << 0) // force looping even if the sound is not looped
13 #define CHANNELFLAG_LOCALSOUND  (1 << 1) // INTERNAL USE. Not settable by S_SetChannelFlag
14 #define CHANNELFLAG_PAUSED              (1 << 2)
15 #define CHANNELFLAG_FULLVOLUME  (1 << 3) // isn't affected by the general volume
16
17 #define SFXFLAG_NONE            0
18 //#define SFXFLAG_FILEMISSING   (1 << 0) // wasn't able to load the associated sound file
19 #define SFXFLAG_SERVERSOUND     (1 << 1) // the sfx is part of the server precache list
20 //#define SFXFLAG_STREAMED              (1 << 2) // informative only. You shouldn't need to know that
21 #define SFXFLAG_PERMANENTLOCK   (1 << 3) // can never be freed (ex: used by the client code)
22
23 typedef struct channel_s{
24         struct channel_s* next;
25         void* rasptr;//Sound Event // This is also used to indicate a unused slot (when it's pointing to 0)
26         int   entnum;// to allow overriding a specific sound
27         int   entchannel;
28         unsigned int   id;
29 } channel_t;
30
31 typedef struct entnum_s{
32         struct entnum_s *next;
33         int       entnum;
34         vec3_t    lastloc; //Since DP has no way of tracking the deletion, we will use this instead (great jumps indicate teleport or new ent
35         void     *rasptr;//Sound Source // This is also used to indicate a unused slot (when it's pointing to 0)
36 } entnum_t;
37
38 struct sfx_s{
39         struct sfx_s *next;
40         char  name[MAX_QPATH];
41         void* rasptr; //Sound Data// The sound data allocated in the lib
42         
43         int locks;
44         unsigned int flags;             // cf SFXFLAG_* defines
45         //unsigned int loopstart;       // in sample frames. equals total_length if not looped
46         //unsigned int total_length;    // in sample frames
47 };
48
49 #endif