Use Juce CriticalSection for main audio processor too. Use tryEnter for changing main volume parameter. Looks like it's best to do the tryEnter stuff for everything possible...
This commit is contained in:
@ -134,9 +134,12 @@ void StretchAudioSource::setMainVolume(double decibels)
|
||||
{
|
||||
if (decibels == m_main_volume)
|
||||
return;
|
||||
ScopedLock locker(m_cs);
|
||||
m_main_volume = jlimit(-144.0, 12.0, decibels);
|
||||
++m_param_change_count;
|
||||
if (m_cs.tryEnter())
|
||||
{
|
||||
m_main_volume = jlimit(-144.0, 12.0, decibels);
|
||||
++m_param_change_count;
|
||||
m_cs.exit();
|
||||
}
|
||||
}
|
||||
|
||||
void StretchAudioSource::setLoopXFadeLength(double lenseconds)
|
||||
|
Reference in New Issue
Block a user