Changeset 58590 in vbox
- Timestamp:
- Nov 5, 2015 4:54:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r58582 r58590 216 216 { 217 217 uint64_t u64StartMs = RTTimeMilliTS(); 218 uint64_t u64ElapsedMs;219 220 218 while (pa_operation_get_state(pOP) == PA_OPERATION_RUNNING) 221 219 { 222 pa_threaded_mainloop_wait(g_pMainLoop); 223 224 u64ElapsedMs = RTTimeMilliTS() - u64StartMs; 220 if (!g_fAbortMainLoop) 221 pa_threaded_mainloop_wait(g_pMainLoop); 222 g_fAbortMainLoop = false; 223 224 uint64_t u64ElapsedMs = RTTimeMilliTS() - u64StartMs; 225 225 if (u64ElapsedMs >= cMsTimeout) 226 226 { … … 317 317 drvHostPulseAudioAbortMainLoop(); 318 318 else 319 drvHostPulseAudioError(pStrm->pDrv, "Failed to finish stream operation");319 drvHostPulseAudioError(pStrm->pDrv, "Failed to finish stream operation"); 320 320 } 321 321 … … 400 400 401 401 /* Wait until the stream is ready. */ 402 pa_stream_state_t sstate;403 402 for (;;) 404 403 { 405 404 if (!g_fAbortMainLoop) 406 405 pa_threaded_mainloop_wait(g_pMainLoop); 407 408 sstate = pa_stream_get_state(pStream); 406 g_fAbortMainLoop = false; 407 408 pa_stream_state_t sstate = pa_stream_get_state(pStream); 409 409 if (sstate == PA_STREAM_READY) 410 410 break; … … 433 433 pBufAttr->maxlength, pBufAttr->tlength, pBufAttr->prebuf, pBufAttr->minreq)); 434 434 435 pa_threaded_mainloop_unlock(g_pMainLoop);436 435 } 437 436 while (0); 438 437 438 if ( RT_FAILURE(rc) 439 && pStream) 440 pa_stream_disconnect(pStream); 441 442 pa_threaded_mainloop_unlock(g_pMainLoop); 443 439 444 if (RT_FAILURE(rc)) 440 445 { 441 if (pStream)442 pa_stream_disconnect(pStream);443 444 pa_threaded_mainloop_unlock(g_pMainLoop);445 446 446 if (pStream) 447 447 pa_stream_unref(pStream); … … 512 512 for (;;) 513 513 { 514 pa_context_state_t cstate;515 514 if (!g_fAbortMainLoop) 516 515 pa_threaded_mainloop_wait(g_pMainLoop); 517 518 cstate = pa_context_get_state(g_pContext); 516 g_fAbortMainLoop = false; 517 518 pa_context_state_t cstate = pa_context_get_state(g_pContext); 519 519 if (cstate == PA_CONTEXT_READY) 520 520 break;
Note:
See TracChangeset
for help on using the changeset viewer.

