return SIS_FAILURE;
}
- pDirectSoundCreate = (void *)GetProcAddress(hInstDS,"DirectSoundCreate");
+ pDirectSoundCreate = (HRESULT (__stdcall *)(GUID *, LPDIRECTSOUND *,IUnknown *))GetProcAddress(hInstDS,"DirectSoundCreate");
if (!pDirectSoundCreate)
{
SndSys_Shutdown ();
return false;
}
- lpData = GlobalLock(hData);
+ lpData = (HPSTR)GlobalLock(hData);
if (!lpData)
{
Con_Print("Sound: Failed to lock.\n");
unsigned int SndSys_GetSoundTime (void)
{
unsigned int factor;
- MMRESULT res;
- MMTIME mmtime;
factor = snd_renderbuffer->format.width * snd_renderbuffer->format.channels;
if (wav_init)
{
- /*
// Find which sound blocks have completed
for (;;)
{
}
return (snd_completed * wav_buffer_size) / factor;
- */
+
+ /*
+ * S_PaintAndSubmit: WARNING: newsoundtime (soundtime (275 < 134217707)
+ * apparently this sound time wraps quite early?
+ {
+ MMRESULT res;
+ MMTIME mmtime;
mmtime.wType = TIME_SAMPLES;
res = waveOutGetPosition(hWaveOut, &mmtime, sizeof(mmtime));
if(res == MMSYSERR_NOERROR)
return mmtime.u.sample;
+ }
+ */
}
return 0;
IDirectSoundBuffer_Unlock(pDSBuf, dsound_pbuf, dsound_dwSize, dsound_pbuf2, dsound_dwSize2);
#endif
}
+
+/*
+====================
+SndSys_SendKeyEvents
+
+Send keyboard events originating from the sound system (e.g. MIDI)
+====================
+*/
+void SndSys_SendKeyEvents(void)
+{
+ // not supported
+}