diff --git a/src/hostapi/dsound/pa_win_ds.c b/src/hostapi/dsound/pa_win_ds.c index b0ab18725..c88ad62d8 100644 --- a/src/hostapi/dsound/pa_win_ds.c +++ b/src/hostapi/dsound/pa_win_ds.c @@ -106,12 +106,10 @@ #if !defined(__CYGWIN__) && !defined(UNDER_CE) #define CREATE_THREAD (HANDLE)_beginthreadex -#undef CLOSE_THREAD_HANDLE /* as per documentation we don't call CloseHandle on a thread created with _beginthreadex */ #define PA_THREAD_FUNC static unsigned WINAPI #define PA_THREAD_ID unsigned #else #define CREATE_THREAD CreateThread -#define CLOSE_THREAD_HANDLE CloseHandle #define PA_THREAD_FUNC static DWORD WINAPI #define PA_THREAD_ID DWORD #endif @@ -3051,9 +3049,7 @@ static PaError StartStream( PaStream *s ) #ifndef PA_WIN_DS_USE_WMME_TIMER if( stream->processingThread ) { -#ifdef CLOSE_THREAD_HANDLE - CLOSE_THREAD_HANDLE( stream->processingThread ); /* Delete thread. */ -#endif + CloseHandle( stream->processingThread ); /* Delete thread. */ stream->processingThread = NULL; } #endif @@ -3092,10 +3088,8 @@ static PaError StopStream( PaStream *s ) if( WaitForSingleObject( stream->processingThreadCompleted, 30*100 ) == WAIT_TIMEOUT ) return paUnanticipatedHostError; -#ifdef CLOSE_THREAD_HANDLE CloseHandle( stream->processingThread ); /* Delete thread. */ stream->processingThread = NULL; -#endif } #endif