Thread priority question

Discuss issues relating to audio plugins

Thread priority question

Postby Alatar » Sat Jun 16, 2012 6:39 pm

Hello,

I was wondering if it is safe to assume, that the audio thread in my plugin allways has the highest priority? ( I am refering to the one created by subclassing "AudioProcessor")
What priority does it actually have?

In my case, I am updating the GUI with a timer thread (JUCE::Timer). Can I be sure, that the audio thread allways has precedence and I do not have to fear dropouts?
Alatar
JUCE Geek
 
Posts: 29
Joined: Sun Jan 29, 2012 10:44 am
Location: Europe

Re: Thread priority question

Postby TheVinn » Sat Jun 16, 2012 6:49 pm

Its a fairly safe assumption. Most audio threads are high-priority threads provided by the operating system. You should not need to mess with priorities or worry about them.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2990
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Thread priority question

Postby Alatar » Mon Jun 18, 2012 6:38 pm

Thanks Vinn,

Thats reassuring. Good to know I do not need to worry. :-)
Alatar
JUCE Geek
 
Posts: 29
Joined: Sun Jan 29, 2012 10:44 am
Location: Europe

Re: Thread priority question

Postby TheVinn » Mon Jun 18, 2012 7:03 pm

Alatar wrote:Good to know I do not need to worry. :-)


You still need to make sure you don't call from anything inside your processReplacing() that can block (like malloc, free, new, delete, operating system calls, etc).
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2990
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California


Return to Audio Plugins

Who is online

Users browsing this forum: Google [Bot] and 1 guest