Use CriticalSection in audio source. Add bool argument for seek to get immediate seeks. etc

This commit is contained in:
xenakios
2018-05-31 13:55:32 +03:00
parent 1f8f57666d
commit b8e408a73e
4 changed files with 18 additions and 16 deletions

View File

@ -542,6 +542,7 @@ void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int sampl
m_curmaxblocksize = samplesPerBlock;
m_input_buffer.setSize(getMainBusNumInputChannels(), samplesPerBlock);
*getBoolParameter(cpi_rewind) = false;
m_lastrewind = false;
int numoutchans = *m_outchansparam;
if (numoutchans != m_cur_num_out_chans)
m_prebuffering_inited = false;
@ -693,7 +694,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
if (m_stretch_source->isLoopEnabled() != *getBoolParameter(cpi_looping_enabled))
m_stretch_source->setLoopingEnabled(*getBoolParameter(cpi_looping_enabled));
bool rew = *getBoolParameter(cpi_rewind);
if (rew !=m_lastrewind)
if (rew != m_lastrewind)
{
if (rew == true)
{