Changeset 26783 in vbox for trunk/src/VBox/Devices/Audio/pulseaudio.c
- Timestamp:
- Feb 25, 2010 11:42:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/pulseaudio.c
r25768 r26783 475 475 { 476 476 case VOICE_ENABLE: 477 /* Start audio output. */ 477 478 pa_threaded_mainloop_lock(g_pMainLoop); 478 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 0, stream_success_callback, pPulse)); 479 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 0, 480 stream_success_callback, pPulse)); 479 481 pa_threaded_mainloop_unlock(g_pMainLoop); 480 482 break; 481 483 482 484 case VOICE_DISABLE: 485 /* Pause audio output. Note that we must return immediately from here 486 * so waiting until the buffers are flushed (trigger+drain) is not an 487 * option! It could be sufficient to cork the audio stream (we are 488 * called if the Pause bit of the AC97 x_CR register is set) but ALSA 489 * uses snd_pcm_drop() dropping all pending frames so we do the same 490 * here. */ 483 491 pa_threaded_mainloop_lock(g_pMainLoop); 484 pulse_wait_for_operation(pa_stream_trigger(pPulse->pStream, stream_success_callback, pPulse)); 485 pulse_wait_for_operation(pa_stream_drain(pPulse->pStream, stream_success_callback, pPulse)); 486 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 1, stream_success_callback, pPulse)); 492 pulse_wait_for_operation(pa_stream_flush(pPulse->pStream, 493 stream_success_callback, pPulse)); 494 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 1, 495 stream_success_callback, pPulse)); 487 496 pa_threaded_mainloop_unlock(g_pMainLoop); 488 497 break; … … 644 653 case VOICE_ENABLE: 645 654 pa_threaded_mainloop_lock(g_pMainLoop); 646 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 0, stream_success_callback, pPulse)); 655 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 0, 656 stream_success_callback, pPulse)); 647 657 pa_threaded_mainloop_unlock(g_pMainLoop); 648 658 break; … … 655 665 pPulse->pu8PeekBuf = NULL; 656 666 } 657 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 1, stream_success_callback, pPulse)); 667 pulse_wait_for_operation(pa_stream_cork(pPulse->pStream, 1, 668 stream_success_callback, pPulse)); 658 669 pa_threaded_mainloop_unlock(g_pMainLoop); 659 670 break;
Note:
See TracChangeset
for help on using the changeset viewer.