Lock mutex when restoring plugin state
This commit is contained in:
parent
321e9bbf1c
commit
9207325698
@ -356,9 +356,10 @@ void PaulstretchpluginAudioProcessor::getStateInformation (MemoryBlock& destData
|
|||||||
|
|
||||||
void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
||||||
{
|
{
|
||||||
ValueTree tree = ValueTree::readFromData(data, sizeInBytes);
|
ValueTree tree = ValueTree::readFromData(data, sizeInBytes);
|
||||||
if (tree.isValid())
|
if (tree.isValid())
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> locker(m_mutex);
|
||||||
for (int i = 0; i<getNumParameters(); ++i)
|
for (int i = 0; i<getNumParameters(); ++i)
|
||||||
{
|
{
|
||||||
auto par = getFloatParameter(i);
|
auto par = getFloatParameter(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user