X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=snd_win.c;h=0f62112c519daaf3260630b7be6683037c7bcea4;hb=a53125498eeac71ffa52aa0160c3de455799877b;hp=8d4f00d272c5b91d004c7ce14169fc0af5209110;hpb=dcdf05c7f472f30dbfbfe35e6e17b791090e2b6d;p=xonotic%2Fdarkplaces.git diff --git a/snd_win.c b/snd_win.c index 8d4f00d2..0f62112c 100644 --- 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;