Detect host offline rendering state and if active, use the stretchsource directly instead of the thread buffered source

This commit is contained in:
xenakios
2017-12-19 00:37:02 +02:00
parent d900572506
commit 7238c71e66
3 changed files with 11 additions and 2 deletions

View File

@ -413,9 +413,15 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
m_stretch_source->setFreezing(getParameter(cpi_freeze));
m_stretch_source->setPaused(getParameter(cpi_pause_enabled));
m_stretch_source->setProcessParameters(&m_ppar);
AudioSourceChannelInfo aif(buffer);
m_buffering_source->getNextAudioBlock(aif);
if (isNonRealtime())
{
m_stretch_source->getNextAudioBlock(aif);
}
else
{
m_buffering_source->getNextAudioBlock(aif);
}
for (int i = 0; i < buffer.getNumChannels(); ++i)
{
for (int j = 0; j < buffer.getNumSamples(); ++j)