MCPcopy Create free account
hub / github.com/LabSound/LabSound / pulseaudio_callback

Function pulseaudio_callback

src/backends/RtAudio/RtAudio.cpp:9325–9345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9323}
9324
9325static 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
9347void RtApiPulse::closeStream(void)
9348{

Callers

nothing calls this directly

Calls 1

callbackEventMethod · 0.80

Tested by

no test coverage detected