MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / alsaCallbackHandler

Function alsaCallbackHandler

examples/TinyAudio/RtAudio.cpp:8868–8890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8866}
8867
8868static void *alsaCallbackHandler(void *ptr)
8869{
8870 CallbackInfo *info = (CallbackInfo *)ptr;
8871 RtApiAlsa *object = (RtApiAlsa *)info->object;
8872 bool *isRunning = &info->isRunning;
8873
8874#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
8875 if (info->doRealtime)
8876 {
8877 pthread_t tID = pthread_self(); // ID of this thread
8878 sched_param prio = {info->priority}; // scheduling priority of thread
8879 pthread_setschedparam(tID, SCHED_RR, &prio);
8880 }
8881#endif
8882
8883 while (*isRunning == true)
8884 {
8885 pthread_testcancel();
8886 object->callbackEvent();
8887 }
8888
8889 pthread_exit(NULL);
8890}
8891
8892//******************** End of __LINUX_ALSA__ *********************//
8893#endif

Callers

nothing calls this directly

Calls 1

callbackEventMethod · 0.80

Tested by

no test coverage detected