Plugin initialization bug existed also on Windows, fixed for now...Make the GUI poll for some state changes from the AudioProcessor, instead of the processor calling the GUI. When using memory buffer in input source, copy all channels to xfade buffer. Some other tweaks.

This commit is contained in:
xenakios
2017-11-16 16:58:04 +02:00
parent 84e564b393
commit 43be82edc8
6 changed files with 30 additions and 14 deletions

View File

@ -280,7 +280,6 @@ void PaulstretchpluginAudioProcessor::getStateInformation (MemoryBlock& destData
void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
return;
ValueTree tree = ValueTree::readFromData(data, sizeInBytes);
if (tree.isValid())
{
@ -296,15 +295,6 @@ void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int
m_using_memory_buffer = false;
File f(fn);
setAudioFile(f);
Timer::callAfterDelay(500, [this,f]()
{
callGUI(this,[f,this](PaulstretchpluginAudioProcessorEditor* ed)
{
ed->setAudioFile(f);
ed->m_wavecomponent.setTimeSelection({ *getFloatParameter(5),*getFloatParameter(6) });
}, false);
});
}
}
}
@ -354,6 +344,11 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f)
return String();
}
Range<double> PaulstretchpluginAudioProcessor::getTimeSelection()
{
return { *getFloatParameter(5),*getFloatParameter(6) };
}
void PaulstretchpluginAudioProcessor::finishRecording(int lenrecording)
{
m_is_recording = false;