From a3b034ac4415154b51310474a936f4f3585619c0 Mon Sep 17 00:00:00 2001 From: xenakios Date: Thu, 22 Feb 2018 01:54:21 +0200 Subject: [PATCH] Count calls to prepareToPlay --- Source/PluginEditor.cpp | 3 ++- Source/PluginProcessor.cpp | 3 ++- Source/PluginProcessor.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index d76f599..ab48c62 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -259,7 +259,8 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) String infotext; if (processor.m_show_technical_info) { - infotext += String(processor.getStretchSource()->m_param_change_count); + infotext += String(processor.m_prepare_count)+" "; + infotext += String(processor.getStretchSource()->m_param_change_count); infotext += " param changes "; } infotext += m_last_err + " [FFT size " + diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 38bbe21..6f95d0b 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -403,7 +403,8 @@ double PaulstretchpluginAudioProcessor::getSampleRateChecked() void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) { - ScopedLock locker(m_cs); + ++m_prepare_count; + ScopedLock locker(m_cs); m_cur_sr = sampleRate; m_curmaxblocksize = samplesPerBlock; m_input_buffer.setSize(getMainBusNumInputChannels(), samplesPerBlock); diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 55c346c..d57612a 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -165,6 +165,7 @@ public: std::unique_ptr m_thumb; bool m_show_technical_info = false; Range m_wave_view_range; + int m_prepare_count = 0; private: