fixed buffer overflow issue with large channel counts, found from au validation fail
This commit is contained in:
parent
9d3d40bde7
commit
feec263875
@ -313,10 +313,10 @@ void StretchAudioSource::getNextAudioBlock(const AudioSourceChannelInfo & buffer
|
||||
|
||||
|
||||
if (m_vol_smoother.getTargetValue() != maingain)
|
||||
m_vol_smoother.setValue(maingain);
|
||||
m_vol_smoother.setTargetValue(maingain);
|
||||
FloatVectorOperations::disableDenormalisedNumberSupport();
|
||||
float** outarrays = bufferToFill.buffer->getArrayOfWritePointers();
|
||||
int outbufchans = m_num_outchans; // bufferToFill.buffer->getNumChannels();
|
||||
int outbufchans = jmin(m_num_outchans, bufferToFill.buffer->getNumChannels());
|
||||
int offset = bufferToFill.startSample;
|
||||
if (m_stretchers.size() == 0)
|
||||
return;
|
||||
@ -547,6 +547,10 @@ void StretchAudioSource::initObjects()
|
||||
//Logger::writeToLog("Resizing circular buffer to " + String(newsize));
|
||||
m_stretchoutringbuf.resize(newsize);
|
||||
}
|
||||
if (m_xfadetask.buffer.getNumChannels() < m_num_outchans)
|
||||
{
|
||||
m_xfadetask.buffer.setSize(m_num_outchans, m_xfadetask.buffer.getNumSamples());
|
||||
}
|
||||
m_stretchoutringbuf.clear();
|
||||
m_resampler->Reset();
|
||||
m_resampler->SetRates(m_inputfile->info.samplerate, m_outsr);
|
||||
|
Loading…
Reference in New Issue
Block a user