]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sound.h
rewrote memory system entirely (hunk, cache, and zone are gone, memory pools replaced...
[xonotic/darkplaces.git] / sound.h
diff --git a/sound.h b/sound.h
index 3c9f980a355de930be2021cc9764da3bf5eafd14..bf2afa71786a701de5098a54e43869228df305d1 100644 (file)
--- a/sound.h
+++ b/sound.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 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.
 
@@ -31,12 +31,6 @@ typedef struct
        int right;
 } portable_samplepair_t;
 
-typedef struct sfx_s
-{
-       char    name[MAX_QPATH];
-       cache_user_t    cache;
-} sfx_t;
-
 typedef struct
 {
        int     length;
@@ -47,6 +41,13 @@ typedef struct
        byte    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;
@@ -130,12 +131,12 @@ void SNDDMA_Shutdown(void);
 #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
@@ -143,10 +144,10 @@ extern    int                     total_channels;
 // number of times S_Update() is called per second.
 //
 
-extern qboolean                fakedma;
-extern int                     fakedma_updates;
-extern int             paintedtime;
-extern int             soundtime;
+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;
@@ -155,13 +156,14 @@ extern volatile dma_t *shm;
 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        snd_initialized;
 
-extern int             snd_blocked;
+extern int snd_blocked;
 
 void S_LocalSound (char *s);
 sfxcache_t *S_LoadSound (sfx_t *s);