https://bugs.freedesktop.org/show_bug.cgi?id=56735
--- Comment #12 from Yupeng Chang <[email protected]> --- (In reply to comment #11) > (In reply to comment #10) > > I designed my program based on the callback mechanism of pa_mainloop, so I > > didn't use threaded-mainloop. > > The threaded mainloop is also going to end up calling those callbacks and it > fits your model of usage a lot better, so if you can, you really should look > into using it. 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. So I decided to use pa_mainloop and wrap it into a thread class which I can control all the thread preferences. It's my fault that I didn't read the source code carefully. There's just one step close to the success. The only way I can think of is to register a signal handler in the same thread of pa_mainloop_run, in this handler, pa_mainloop_quit is called, and trigger this signal in other thread. -- 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
