// Wait in busy loop for async operation to complete
while (SUCCEEDED(hr) && !handlerImpl->done)
{
- Pa_Sleep(1);
+ Sleep(1);
}
(*client) = handlerImpl->out.client;
{
if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)
{
- Pa_Sleep(sleep);
+ Sleep(sleep);
sleep = 0;
}
}
{
#ifndef UNDER_CE
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
- struct _timeb tv = { 0 };
- _ftime_s(&tv);
- return (double)tv.time + tv.millitm * .001;
+ return GetTickCount64() * .001;
#else
return timeGetTime() * .001;
#endif
#include <windows.h>
#include <mmsystem.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+ #include <mmreg.h> /* for WAVEFORMATEX */
+#endif
#include "portaudio.h"
#include "pa_win_waveformat.h"
#endif
-#if !defined(WAVE_FORMAT_PCM)
-#define WAVE_FORMAT_PCM 1
-typedef struct tWAVEFORMAT
-{
- WORD wFormatTag;
- WORD nChannels;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
-}
-WAVEFORMAT;
-#endif
-
-
-#if !defined(_WAVEFORMATEX_)
-#define _WAVEFORMATEX_
-typedef struct tWAVEFORMATEX
-{
- WORD wFormatTag;
- WORD nChannels;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
- WORD wBitsPerSample;
- WORD cbSize;
-}
-WAVEFORMATEX;
-#endif
-
-
static GUID pawin_ksDataFormatSubtypeGuidBase =
{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };