https://bugs.freedesktop.org/show_bug.cgi?id=56735
--- Comment #14 from Yupeng Chang <[email protected]> --- (In reply to comment #13) > (In reply to comment #12) > [...] > > Thanks for your advise. > > I have considered using threaded-mainloop, but there's one thing made me > > give up. > > My program is a real-time recording program, other threads are set to RT > > thread. > > There isn't an API of threaded-mainloop to set it to run as a RT thread. > [...] > > You can do this in the context state callback before you actually connect > the stream, which is well before the audio work actually begins. I think the best way to do so, is to send a special message, for example "quit", to m->wakeup_pipe[1], in the poll function, when this special message is received, m->quit is set to true, then poll quit cleanly. In this model, pa_mainloop_quit() just "tells" pa_mainloop_run() to quit, the former API won't modify any private data of PaMainloop. B.T.W signal handler is not elegant to make mainloop quit. it's just a hack method. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.
_______________________________________________ pulseaudio-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
