diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 84c0afc..8b989e6 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -118,6 +118,8 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) String(processor.getStretchSource()->getFFTSize()); if (processor.m_abnormal_output_samples > 0) infotext += " " + String(processor.m_abnormal_output_samples) + " invalid sample values"; + if (processor.isNonRealtime()) + infotext += " (offline rendering)"; m_info_label.setText(infotext, dontSendNotification); } if (id == 2) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index caa7dfe..a3f872b 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -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) diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 91144ac..3ae0550 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -111,6 +111,7 @@ public: void timerCallback(int id) override; double getSampleRateChecked(); int m_abnormal_output_samples = 0; + private: