Hi,
I’m writing a custom C++ program (using PortAudio library) to process audio. What do I need to do so that my executable runs in real-time (with real-time priority) in Patchbox OS?
Do I need to add something to the code itself?
Or do I just run the executable in certain way (and if so, what way)?
Thanks!
Hey, it’s the same way as for the rest of the Linux.
Here’s some example code which raises the priority of the main thread as well as spawned threads: https://stackoverflow.com/a/49072264/7823460
Or you could use nice
command to start your program with specified priority, or renice
to modify the priority of an already running program: Nice and Renice Command in Linux with Examples - GeeksforGeeks
1 Like