]> Repos - portaudio/commitdiff
Added typedef to remove error with _beginthreadex
authorrobiwan <robiwan@0f58301d-fd10-0410-b4af-bbb618454e57>
Tue, 10 Jul 2012 08:16:48 +0000 (08:16 +0000)
committerrobiwan <robiwan@0f58301d-fd10-0410-b4af-bbb618454e57>
Tue, 10 Jul 2012 08:16:48 +0000 (08:16 +0000)
examples/paex_record_file.c

index 9e605063855ed653b7735e4a637f7b29be39ee66..1651f75819bd3e91c15e869f9bd18d83d34163e0 100644 (file)
@@ -194,7 +194,8 @@ typedef int (*ThreadFunctionType)(void*);
 static PaError startThread( paTestData* pData, ThreadFunctionType fn )\r
 {\r
 #ifdef _WIN32\r
-    pData->threadHandle = (void*)_beginthreadex(NULL, 0, fn, pData, CREATE_SUSPENDED, NULL);\r
+    typedef unsigned (__stdcall* WinThreadFunctionType)(void*);\r
+    pData->threadHandle = (void*)_beginthreadex(NULL, 0, (WinThreadFunctionType)fn, pData, CREATE_SUSPENDED, NULL);\r
     if (pData->threadHandle == NULL) return paUnanticipatedHostError;\r
 \r
     /* Set file thread to a little higher prio than normal */\r