Do some clean-up and migrate to the latest JUCE

This commit is contained in:
2022-11-04 23:11:33 +01:00
committed by Nikolai Rodionov
parent 4257a0f8ba
commit 913d851fd5
3393 changed files with 381 additions and 1064540 deletions

View File

@ -123,7 +123,7 @@ public:
return m_readbuf.getSample(ch, int(pos - m_cached_file_range.getStart()));
else
{
Range<int64_t> activerange((int64_t)(m_activerange.getStart()*info.nsamples),
Range<int64_t> activerange((int64_t)(m_activerange.getStart()*info.nsamples),
(int64_t)(m_activerange.getEnd()*info.nsamples+1));
Range<int64_t> possiblerange(pos, pos + m_readbuf.getNumSamples() + 0);
m_cached_file_range = activerange.getIntersectionWith(possiblerange);
@ -154,7 +154,7 @@ public:
++m_silenceoutputted;
return 0.0f;
};
float** smps = abuf.getArrayOfWritePointers();
float* const* smps = abuf.getArrayOfWritePointers();
int readinc = 1;
if (m_reverseplay)
readinc = -1;
@ -212,7 +212,7 @@ public:
for (int j = 0; j < numchans; ++j)
{
int inchantouse = j % inchans;
smps[j][i] = seekfadegain*getCrossFadedSampleLambda(m_currentsample, inchantouse,
smps[j][i] = seekfadegain*getCrossFadedSampleLambda(m_currentsample, inchantouse,
subsect_t0, subsect_t1,xfadelen);
}
@ -224,7 +224,7 @@ public:
{
m_currentsample = subsect_t0+xfadelen;
++m_loopcount;
}
}
else if (m_reverseplay == true && m_currentsample < subsect_t0)
{
m_currentsample = subsect_t1 - 1;
@ -237,7 +237,7 @@ public:
PlayRangeEndCallback(this);
}
}
return nsmps;
}
void seekImpl(double pos)
@ -282,7 +282,7 @@ public:
}
m_seekfade.length = 16384;
m_seekfade.requestedpos = pos;
}
std::pair<Range<double>,Range<double>> getCachedRangesNormalized()
@ -322,7 +322,7 @@ public:
void setActiveRange(Range<double> rng) override
{
ScopedLock locker(m_mutex);
/*
if (rng.contains(getCurrentPositionPercent()))
{
@ -373,7 +373,7 @@ public:
}
bool isReversed() { return m_reverseplay; }
int64_t getLoopCount() { return m_loopcount; }
private:
std::function<void(AInputS*)> PlayRangeEndCallback;
std::unique_ptr<AudioFormatReader> m_afreader;

View File

@ -316,7 +316,7 @@ void StretchAudioSource::getNextAudioBlock(const AudioSourceChannelInfo & buffer
if (m_vol_smoother.getTargetValue() != maingain)
m_vol_smoother.setTargetValue(maingain);
FloatVectorOperations::disableDenormalisedNumberSupport();
float** outarrays = bufferToFill.buffer->getArrayOfWritePointers();
float* const* outarrays = bufferToFill.buffer->getArrayOfWritePointers();
int outbufchans = jmin(m_num_outchans, bufferToFill.buffer->getNumChannels());
int offset = bufferToFill.startSample;
if (m_stretchers.size() == 0)