[pulseaudio-discuss] call pa_stream_drain() for multiple streams

su su_cj81 at 163.com
Thu Mar 10 20:28:00 UTC 2022


At first I would like to take this chance to express my gratitude to PulseAudio dev. team and those warm-hearted members at this community  :)




I have a minor question about calling pa_stream_drain()  for multiple streams at the same context. It seems I cannot issue this command 

for multiple streams at the same time : 




for ( int stream_index = 0 ; stream_index < 2 ; stream_index++)

{

    pa_operation* pa_op= pa_stream_drain( pa_stream *  audio_stream[ stream_index ]  ,

                my_pa_stream_success_cb_t, NULL );




    while (pa_operation_get_state(pa_op) != PA_OPERATION_DONE) {

    sleep(1);

    }

}   




How to wait for the done signal to pa_stream_drain() the next stream  efficiently  ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20220311/b9974f95/attachment.htm>


More information about the pulseaudio-discuss mailing list