| 9323 | } |
| 9324 | |
| 9325 | static void * pulseaudio_callback(void * user) |
| 9326 | { |
| 9327 | CallbackInfo * cbi = static_cast<CallbackInfo *>(user); |
| 9328 | RtApiPulse * context = static_cast<RtApiPulse *>(cbi->object); |
| 9329 | volatile bool * isRunning = &cbi->isRunning; |
| 9330 | |
| 9331 | #ifdef SCHED_RR // Undefined with some OSes (e.g. NetBSD 1.6.x with GNU Pthread) |
| 9332 | if (cbi->doRealtime) |
| 9333 | { |
| 9334 | std::cerr << "RtAudio pulse: " << (sched_getscheduler(0) == SCHED_RR ? "" : "_NOT_ ") << "running realtime scheduling" << std::endl; |
| 9335 | } |
| 9336 | #endif |
| 9337 | |
| 9338 | while (*isRunning) |
| 9339 | { |
| 9340 | pthread_testcancel(); |
| 9341 | context->callbackEvent(); |
| 9342 | } |
| 9343 | |
| 9344 | pthread_exit(NULL); |
| 9345 | } |
| 9346 | |
| 9347 | void RtApiPulse::closeStream(void) |
| 9348 | { |
nothing calls this directly
no test coverage detected