#define DEFAULT_SOUND_PACKET_VOLUME 255
#define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
-typedef struct
-{
- int left;
- int right;
-} portable_samplepair_t;
-
typedef struct
{
size_t length;
int leftvol; // 0-255 volume
int rightvol; // 0-255 volume
int end; // end time in global paintsamples
- int pos; // sample position in sfx
+ int lastptime; // last time this channel was painted
+ int pos; // sample position in sfx
int looping; // where to loop, -1 = no looping
int entnum; // to allow overriding a specific sound
int entchannel;
snd_fetcher_end_t end;
};
-typedef struct
-{
- int rate;
- int width;
- int channels;
- int loopstart;
- int samples;
- int dataofs; // chunk starts this many bytes from file start
-} wavinfo_t;
-
void S_Init (void);
void S_Startup (void);
void S_Shutdown (void);
void S_PaintChannels(int endtime);
void S_InitPaintChannels (void);
-// picks a channel based on priorities, empty slots, number of channels
-channel_t *SND_PickChannel(int entnum, int entchannel);
-
-// spatializes a channel
-void SND_Spatialize(channel_t *ch, int isstatic);
-
// initializes cycling through a DMA buffer and returns information on it
qboolean SNDDMA_Init(void);