Merge pull request #406 from bear101/startstream_block
WASAPI: Report thread running so Pa_StartStream can return
This commit is contained in:
commit
a4cbc426d2
1 changed files with 12 additions and 12 deletions
|
|
@ -5890,6 +5890,12 @@ PA_THREAD_FUNC ProcThreadEvent(void *param)
|
|||
goto thread_error;
|
||||
}
|
||||
|
||||
// Signal: stream running
|
||||
stream->running = TRUE;
|
||||
|
||||
// Notify: thread started
|
||||
SetEvent(stream->hThreadStart);
|
||||
|
||||
// Initialize event & start INPUT stream
|
||||
if (stream->in.clientProc)
|
||||
{
|
||||
|
|
@ -5940,12 +5946,6 @@ PA_THREAD_FUNC ProcThreadEvent(void *param)
|
|||
|
||||
}
|
||||
|
||||
// Signal: stream running
|
||||
stream->running = TRUE;
|
||||
|
||||
// Notify: thread started
|
||||
SetEvent(stream->hThreadStart);
|
||||
|
||||
// Notify: state
|
||||
NotifyStateChanged(stream, paWasapiStreamStateThreadStart, ERROR_SUCCESS);
|
||||
|
||||
|
|
@ -6171,6 +6171,12 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
|
|||
// Boost thread priority
|
||||
PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
|
||||
|
||||
// Signal: stream running
|
||||
stream->running = TRUE;
|
||||
|
||||
// Notify: thread started
|
||||
SetEvent(stream->hThreadStart);
|
||||
|
||||
// Initialize event & start INPUT stream
|
||||
if (stream->in.clientProc)
|
||||
{
|
||||
|
|
@ -6238,12 +6244,6 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
|
|||
}
|
||||
}
|
||||
|
||||
// Signal: stream running
|
||||
stream->running = TRUE;
|
||||
|
||||
// Notify: thread started
|
||||
SetEvent(stream->hThreadStart);
|
||||
|
||||
// Notify: state
|
||||
NotifyStateChanged(stream, paWasapiStreamStateThreadStart, ERROR_SUCCESS);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue