]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_win.c
added r_glsl_restart command, and modified shaderstring loading back to the old way...
[xonotic/darkplaces.git] / snd_win.c
index 8d4f00d272c5b91d004c7ce14169fc0af5209110..0f62112c519daaf3260630b7be6683037c7bcea4 100644 (file)
--- a/snd_win.c
+++ b/snd_win.c
@@ -37,7 +37,7 @@ HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS
 // DirectSound output: 64KB in 1 buffer
 #define SECONDARY_BUFFER_SIZE  (64 * 1024)
 
-typedef enum {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat;
+typedef enum sndinitstat_e {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat;
 
 static qboolean        wavonly;
 static qboolean        dsound_init;
@@ -397,6 +397,7 @@ sndinitstat SNDDMA_InitDirect (void)
        pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
 
        shm->samples = gSndBufSize / shm->format.width;
+       shm->sampleframes = shm->samples / shm->format.channels;
        shm->samplepos = 0;
        shm->buffer = (unsigned char *) lpData;
 
@@ -527,6 +528,7 @@ qboolean SNDDMA_InitWav (void)
        }
 
        shm->samples = gSndBufSize / shm->format.width;
+       shm->sampleframes = shm->samples / shm->format.channels;
        shm->samplepos = 0;
        shm->buffer = (unsigned char *) lpData;