]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_win.c
PF_traceline/PF_tracebox can now use world as the edict
[xonotic/darkplaces.git] / snd_win.c
index b8d5175399dfc1c2f1e8cc207bbd45426b93e661..835063791b2c3ebe4076c303038ecd828fb76734 100644 (file)
--- a/snd_win.c
+++ b/snd_win.c
@@ -18,7 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 */
 #include "quakedef.h"
-#include "winquake.h"
+#include <windows.h>
+#include <dsound.h>
+
+extern HWND mainwindow;
 
 #define iDirectSoundCreate(a,b,c)      pDirectSoundCreate(a,b,c)
 
@@ -367,7 +370,7 @@ sndinitstat SNDDMA_InitDirect (void)
 // initialize the buffer
        reps = 0;
 
-       while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &lpData, &dwSize, NULL, NULL, 0)) != DS_OK)
+       while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, (LPVOID*)&lpData, &dwSize, NULL, NULL, 0)) != DS_OK)
        {
                if (hresult != DSERR_BUFFERLOST)
                {
@@ -671,9 +674,7 @@ void SNDDMA_Submit(void)
        {
                if ( snd_completed == snd_sent )
                {
-#ifndef AKVERSION
                        Con_DPrintf ("Sound overrun\n");
-#endif
                        break;
                }
 
@@ -734,7 +735,7 @@ void *S_LockBuffer(void)
        {
                reps = 0;
 
-               while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &dsound_pbuf, &dsound_dwSize, &dsound_pbuf2, &dsound_dwSize2, 0)) != DS_OK)
+               while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, (LPVOID*)&dsound_pbuf, &dsound_dwSize, (LPVOID*)&dsound_pbuf2, &dsound_dwSize2, 0)) != DS_OK)
                {
                        if (hresult != DSERR_BUFFERLOST)
                        {