]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_win.c
don't hexdump png images while reading them (why did it do this??)
[xonotic/darkplaces.git] / snd_win.c
index 2752446fb9ba3c2e3c7373d22037ab1e36889733..490edd292d92ba1163a9719fa28586701d133292 100644 (file)
--- a/snd_win.c
+++ b/snd_win.c
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "snd_main.h"
 #include <windows.h>
+#include <mmsystem.h>
 #include <dsound.h>
 
 extern HWND mainwindow;
@@ -397,6 +398,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 +529,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;