This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
#define DEFAULT_SOUND_PACKET_VOLUME 255
#define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
-// !!! if this is changed, it much be changed in asm_i386.h too !!!
typedef struct
{
int left;
int right;
} portable_samplepair_t;
-typedef struct sfx_s
-{
- char name[MAX_QPATH];
- cache_user_t cache;
-} sfx_t;
-
-// !!! if this is changed, it much be changed in asm_i386.h too !!!
typedef struct
{
int length;
int speed;
int width;
int stereo;
- byte data[1]; // variable sized
+ qbyte data[1]; // variable sized
} sfxcache_t;
+typedef struct sfx_s
+{
+ char name[MAX_QPATH];
+ mempool_t *mempool;
+ sfxcache_t *sfxcache;
+} sfx_t;
+
typedef struct
{
qboolean gamealive;
unsigned char *buffer;
} dma_t;
-// !!! if this is changed, it much be changed in asm_i386.h too !!!
typedef struct
{
sfx_t *sfx; // sfx number
#define MAX_DYNAMIC_CHANNELS 128
-extern channel_t channels[MAX_CHANNELS];
+extern channel_t channels[MAX_CHANNELS];
// 0 to MAX_DYNAMIC_CHANNELS-1 = normal entity sounds
// MAX_DYNAMIC_CHANNELS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS -1 = water, etc
// MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS to total_channels = static sounds
-extern int total_channels;
+extern int total_channels;
//
// Fake dma is a synchronous faking of the DMA progress used for
// number of times S_Update() is called per second.
//
-extern qboolean fakedma;
-extern int fakedma_updates;
-extern int paintedtime;
+extern qboolean fakedma;
+extern int fakedma_updates;
+extern int paintedtime;
+extern int soundtime;
extern vec3_t listener_origin;
extern vec3_t listener_forward;
extern vec3_t listener_right;
extern volatile dma_t sn;
extern vec_t sound_nominal_clip_dist;
-extern cvar_t loadas8bit;
-extern cvar_t bgmvolume;
-extern cvar_t volume;
+extern cvar_t loadas8bit;
+extern cvar_t bgmvolume;
+extern cvar_t volume;
+extern cvar_t snd_swapstereo;
+extern qboolean cdaudioinitialized;
extern qboolean snd_initialized;
-extern int snd_blocked;
+extern int snd_blocked;
void S_LocalSound (char *s);
sfxcache_t *S_LoadSound (sfx_t *s);
-wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength);
+wavinfo_t GetWavinfo (char *name, qbyte *wav, int wavlength);
void SND_InitScaletable (void);
void SNDDMA_Submit(void);