]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_wav.c
gave names to nearly all structs and enums which should make for better C++ error...
[xonotic/darkplaces.git] / snd_wav.c
index 1aa9690ec4f64a9c332ab7a5d9a58562872252ff..59b2d49b52c492360d021feac5e82f6167439d0e 100644 (file)
--- a/snd_wav.c
+++ b/snd_wav.c
@@ -27,7 +27,7 @@
 #include "snd_wav.h"
 
 
-typedef struct
+typedef struct wavinfo_s
 {
        int             rate;
        int             width;
@@ -225,7 +225,7 @@ WAV_FetchSound
 */
 static const sfxbuffer_t* WAV_FetchSound (channel_t* ch, unsigned int start, unsigned int nbsamples)
 {
-       return ch->sfx->fetcher_data;
+       return (sfxbuffer_t *)ch->sfx->fetcher_data;
 }
 
 /*
@@ -235,7 +235,7 @@ WAV_FreeSfx
 */
 static void WAV_FreeSfx (sfx_t* sfx)
 {
-       sfxbuffer_t* sb = sfx->fetcher_data;
+       sfxbuffer_t* sb = (sfxbuffer_t *)sfx->fetcher_data;
 
        // Free the sound buffer
        sfx->memsize -= (sb->length * sfx->format.channels * sfx->format.width) + sizeof (*sb) - sizeof (sb->data);
@@ -295,7 +295,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
        len = len * info.width * info.channels;
 
        memsize = len + sizeof (*sb) - sizeof (sb->data);
-       sb = Mem_Alloc (snd_mempool, memsize);
+       sb = (sfxbuffer_t *)Mem_Alloc (snd_mempool, memsize);
        if (sb == NULL)
        {
                Con_Printf("failed to allocate memory for sound \"%s\"\n", s->name);