Use convenience method to create components

This commit is contained in:
xenakios
2018-05-31 13:21:35 +03:00
parent be0cd89869
commit 1f8f57666d
2 changed files with 6 additions and 6 deletions

View File

@ -629,7 +629,10 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioBuffer<double>& buffer,
void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
ScopedLock locker(m_cs);
const int totalNumInputChannels = getTotalNumInputChannels();
const int totalNumOutputChannels = getTotalNumOutputChannels();
AudioPlayHead* phead = getPlayHead();
if (phead != nullptr)
{
@ -643,8 +646,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
m_cur_sr = srtemp;
m_prebufsmoother.setSlope(0.9, srtemp / buffer.getNumSamples());
m_smoothed_prebuffer_ready = m_prebufsmoother.process(m_buffering_source->getPercentReady());
const int totalNumInputChannels = getTotalNumInputChannels();
const int totalNumOutputChannels = getTotalNumOutputChannels();
for (int i = 0; i < totalNumInputChannels; ++i)
m_input_buffer.copyFrom(i, 0, buffer, i, 0, buffer.getNumSamples());
for (int i = totalNumInputChannels; i < totalNumOutputChannels; ++i)