]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
eliminated qbyte type, now uses unsigned char throughout the engine for this purpose
[xonotic/darkplaces.git] / snd_main.c
index fafb23c1b6220b8f87d86dddc6b4ab9e11d7b195..778e68d73285a5e2625cddc1754debc5aba52743 100644 (file)
@@ -124,7 +124,7 @@ void S_Startup(void)
                shm->format.channels = 2;
                shm->samples = 32768;
                shm->samplepos = 0;
-               shm->buffer = Mem_Alloc(snd_mempool, shm->format.channels * shm->samples * shm->format.width);
+               shm->buffer = (unsigned char *)Mem_Alloc(snd_mempool, shm->format.channels * shm->samples * shm->format.width);
        }
        else
        {
@@ -269,7 +269,7 @@ sfx_t *S_FindName (const char *name)
                        return sfx;
 
        // Add a sfx_t struct for this sound
-       sfx = Mem_Alloc (snd_mempool, sizeof (*sfx));
+       sfx = (sfx_t *)Mem_Alloc (snd_mempool, sizeof (*sfx));
        memset (sfx, 0, sizeof(*sfx));
        strlcpy (sfx->name, name, sizeof (sfx->name));
        sfx->memsize = sizeof(*sfx);
@@ -699,7 +699,7 @@ void S_StopAllSounds (void)
        memset(channels, 0, MAX_CHANNELS * sizeof(channel_t));
 
        // Clear sound buffer
-       pbuf = S_LockBuffer();
+       pbuf = (unsigned char *)S_LockBuffer();
        if (pbuf != NULL)
        {
                int setsize = shm->samples * shm->format.width;
@@ -780,7 +780,7 @@ void S_UpdateAmbientSounds (void)
        float           vol;
        int                     ambient_channel;
        channel_t       *chan;
-       qbyte           ambientlevels[NUM_AMBIENTS];
+       unsigned char           ambientlevels[NUM_AMBIENTS];
 
        if (ambient_level.value <= 0 || !cl.worldmodel || !cl.worldmodel->brush.AmbientSoundLevelsForPoint)
                return;