Try handling multichannel stuff. Not going too well, looks like the plugin will need to get a setting to set the actual number of output channels that will be processed...
This commit is contained in:
parent
b2cdb3aa85
commit
836dad1e7d
@ -113,6 +113,8 @@ void PaulstretchpluginAudioProcessor::changeProgramName (int index, const String
|
|||||||
//==============================================================================
|
//==============================================================================
|
||||||
void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock)
|
void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock)
|
||||||
{
|
{
|
||||||
|
if (getNumOutputChannels() != m_cur_num_out_chans)
|
||||||
|
m_ready_to_play = false;
|
||||||
if (m_using_memory_buffer == true)
|
if (m_using_memory_buffer == true)
|
||||||
{
|
{
|
||||||
int len = jlimit(100,m_recbuffer.getNumSamples(), m_rec_pos);
|
int len = jlimit(100,m_recbuffer.getNumSamples(), m_rec_pos);
|
||||||
@ -134,29 +136,10 @@ void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int sampl
|
|||||||
String err;
|
String err;
|
||||||
m_control->startplay(false, true,
|
m_control->startplay(false, true,
|
||||||
{ *getFloatParameter(5),*getFloatParameter(6) },
|
{ *getFloatParameter(5),*getFloatParameter(6) },
|
||||||
2, err);
|
this->getNumOutputChannels(), err);
|
||||||
|
m_cur_num_out_chans = getNumOutputChannels();
|
||||||
m_ready_to_play = true;
|
m_ready_to_play = true;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
m_ready_to_play = false;
|
|
||||||
m_control->set_input_file(File("C:/MusicAudio/sourcesamples/sheila.wav"), [this](String cberr)
|
|
||||||
{
|
|
||||||
if (cberr.isEmpty())
|
|
||||||
{
|
|
||||||
m_ready_to_play = true;
|
|
||||||
String err;
|
|
||||||
m_control->update_player_stretch();
|
|
||||||
m_control->update_process_parameters();
|
|
||||||
m_control->startplay(false, true, { 0.0,1.0 }, 2, err);
|
|
||||||
auto ed = dynamic_cast<PaulstretchpluginAudioProcessorEditor*>(getActiveEditor());
|
|
||||||
if (ed)
|
|
||||||
{
|
|
||||||
ed->setAudioFile(m_control->getStretchAudioSource()->getAudioFile());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else m_ready_to_play = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaulstretchpluginAudioProcessor::releaseResources()
|
void PaulstretchpluginAudioProcessor::releaseResources()
|
||||||
|
@ -74,6 +74,7 @@ private:
|
|||||||
int m_rec_pos = 0;
|
int m_rec_pos = 0;
|
||||||
void finishRecording(int lenrecorded);
|
void finishRecording(int lenrecorded);
|
||||||
bool m_using_memory_buffer = true;
|
bool m_using_memory_buffer = true;
|
||||||
|
int m_cur_num_out_chans = 2;
|
||||||
std::mutex m_mutex;
|
std::mutex m_mutex;
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessor)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
buildVST="1" buildVST3="0" buildAU="1" buildAUv3="0" buildRTAS="0"
|
buildVST="1" buildVST3="0" buildAU="1" buildAUv3="0" buildRTAS="0"
|
||||||
buildAAX="0" buildStandalone="1" enableIAA="0" pluginName="paulstretchplugin"
|
buildAAX="0" buildStandalone="1" enableIAA="0" pluginName="paulstretchplugin"
|
||||||
pluginDesc="paulstretchplugin" pluginManufacturer="Xenakios"
|
pluginDesc="paulstretchplugin" pluginManufacturer="Xenakios"
|
||||||
pluginManufacturerCode="XenS" pluginCode="Fn1r" pluginChannelConfigs="{2,2},{8,8}"
|
pluginManufacturerCode="XenS" pluginCode="Fn1r" pluginChannelConfigs="{2,2},{4,4}, {8,8}"
|
||||||
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
||||||
pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="paulstretchpluginAU"
|
pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="paulstretchpluginAU"
|
||||||
pluginRTASCategory="" aaxIdentifier="com.yourcompany.paulstretchplugin"
|
pluginRTASCategory="" aaxIdentifier="com.yourcompany.paulstretchplugin"
|
||||||
|
Loading…
Reference in New Issue
Block a user