More work on the AudioFilePreviewComponent, need to add samplerate conversions, volume control etc...

This commit is contained in:
xenakios
2018-09-26 19:19:10 +03:00
parent ab76ba2987
commit f487f8d4f2
4 changed files with 66 additions and 29 deletions

View File

@ -652,6 +652,11 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
m_input_buffer.copyFrom(i, 0, buffer, i, 0, buffer.getNumSamples());
for (int i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
if (m_previewcomponent != nullptr)
{
m_previewcomponent->processBlock(getSampleRate(), buffer);
return;
}
if (m_prebuffering_inited == false)
return;
if (m_is_recording == true)
@ -898,6 +903,12 @@ void PaulstretchpluginAudioProcessor::timerCallback(int id)
}
}
void PaulstretchpluginAudioProcessor::setAudioPreview(AudioFilePreviewComponent * afpc)
{
ScopedLock locker(m_cs);
m_previewcomponent = afpc;
}
pointer_sized_int PaulstretchpluginAudioProcessor::handleVstPluginCanDo(int32 index, pointer_sized_int value, void * ptr, float opt)
{
if (strcmp((char*)ptr, "xenakios") == 0)