macOs build fixes. Plugin itself doesn't work properly...
This commit is contained in:
parent
c283d719d0
commit
d32d855e64
@ -58,8 +58,13 @@ void PaulstretchpluginAudioProcessorEditor::buttonClicked(Button * but)
|
||||
}
|
||||
if (but == &m_import_button)
|
||||
{
|
||||
#ifdef WIN32
|
||||
File initialloc("C:/MusicAudio/sourcesamples");
|
||||
#else
|
||||
File initialloc("/Users/teemu/AudioProjects/sourcesamples");
|
||||
#endif
|
||||
FileChooser myChooser("Please select audio file...",
|
||||
File("C:/MusicAudio/sourcesamples"),
|
||||
initialloc,
|
||||
"*.wav");
|
||||
if (myChooser.browseForFileToOpen())
|
||||
{
|
||||
|
@ -13,6 +13,19 @@
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
template<typename F>
|
||||
void callGUI(AudioProcessor* ap, F&& f, bool async)
|
||||
{
|
||||
auto ed = dynamic_cast<PaulstretchpluginAudioProcessorEditor*>(ap->getActiveEditor());
|
||||
if (ed)
|
||||
{
|
||||
if (async == false)
|
||||
f(ed);
|
||||
else
|
||||
MessageManager::callAsync([ed,f]() { f(ed); });
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
|
||||
#ifndef JucePlugin_PreferredChannelConfigurations
|
||||
@ -123,7 +136,7 @@ void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int sampl
|
||||
m_control->getStretchAudioSource()->setAudioBufferAsInputSource(&m_recbuffer,
|
||||
getSampleRate(),
|
||||
len);
|
||||
callGUI([this,len](auto ed) { ed->setAudioBuffer(&m_recbuffer, getSampleRate(), len); },false);
|
||||
callGUI(this,[this,len](auto ed) { ed->setAudioBuffer(&m_recbuffer, getSampleRate(), len); },false);
|
||||
}
|
||||
if (m_ready_to_play == false)
|
||||
{
|
||||
@ -204,7 +217,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
|
||||
{
|
||||
int recbuflenframes = m_max_reclen * getSampleRate();
|
||||
copyAudioBufferWrappingPosition(buffer, m_recbuffer, m_rec_pos, recbuflenframes);
|
||||
callGUI([this, &buffer](PaulstretchpluginAudioProcessorEditor*ed)
|
||||
callGUI(this,[this, &buffer](PaulstretchpluginAudioProcessorEditor*ed)
|
||||
{
|
||||
ed->addAudioBlock(buffer, getSampleRate(), m_rec_pos);
|
||||
}, false);
|
||||
@ -275,7 +288,7 @@ void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int
|
||||
setAudioFile(f);
|
||||
Timer::callAfterDelay(500, [this,f]()
|
||||
{
|
||||
callGUI([f,this](PaulstretchpluginAudioProcessorEditor* ed)
|
||||
callGUI(this,[f,this](PaulstretchpluginAudioProcessorEditor* ed)
|
||||
{
|
||||
ed->setAudioFile(f);
|
||||
ed->m_wavecomponent.setTimeSelection({ *getFloatParameter(5),*getFloatParameter(6) });
|
||||
@ -297,7 +310,7 @@ void PaulstretchpluginAudioProcessor::setRecordingEnabled(bool b)
|
||||
m_recbuffer.setSize(2, m_max_reclen*getSampleRate()+4096);
|
||||
m_recbuffer.clear();
|
||||
m_rec_pos = 0;
|
||||
callGUI([this,lenbufframes](PaulstretchpluginAudioProcessorEditor* ed)
|
||||
callGUI(this,[this,lenbufframes](PaulstretchpluginAudioProcessorEditor* ed)
|
||||
{
|
||||
ed->beginAddingAudioBlocks(2, getSampleRate(), lenbufframes);
|
||||
},false);
|
||||
|
@ -79,18 +79,7 @@ private:
|
||||
int m_cur_num_out_chans = 2;
|
||||
std::mutex m_mutex;
|
||||
File m_current_file;
|
||||
template<typename F>
|
||||
void callGUI(F&& f, bool async)
|
||||
{
|
||||
auto ed = dynamic_cast<PaulstretchpluginAudioProcessorEditor*>(getActiveEditor());
|
||||
if (ed)
|
||||
{
|
||||
if (async == false)
|
||||
f(ed);
|
||||
else
|
||||
MessageManager::callAsync([ed,f]() { f(ed); });
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessor)
|
||||
};
|
||||
|
@ -4,8 +4,8 @@
|
||||
reportAppUsage="0" splashScreenColour="Dark" projectType="audioplug"
|
||||
version="1.0.0" bundleIdentifier="com.yourcompany.paulstretchplugin"
|
||||
includeBinaryInAppConfig="1" cppLanguageStandard="latest" companyCopyright=""
|
||||
buildVST="1" buildVST3="0" buildAU="1" buildAUv3="0" buildRTAS="0"
|
||||
buildAAX="0" buildStandalone="1" enableIAA="0" pluginName="paulstretchplugin"
|
||||
buildVST="1" buildVST3="0" buildAU="0" buildAUv3="0" buildRTAS="0"
|
||||
buildAAX="0" buildStandalone="0" enableIAA="0" pluginName="paulstretchplugin"
|
||||
pluginDesc="paulstretchplugin" pluginManufacturer="Xenakios"
|
||||
pluginManufacturerCode="XenS" pluginCode="Fn1r" pluginChannelConfigs="{2,2},{4,4}, {8,8}"
|
||||
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
||||
@ -52,12 +52,16 @@
|
||||
</GROUP>
|
||||
</MAINGROUP>
|
||||
<EXPORTFORMATS>
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX">
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX" extraLinkerFlags="/usr/local/Cellar/fftw/3.3.6-pl2/lib/libfftw3f.a ">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" enablePluginBinaryCopyStep="1" isDebug="1" optimisation="1"
|
||||
linkTimeOptimisation="0" targetName="paulstretchplugin" headerPath="Source/PS_Source Source/WDL "/>
|
||||
linkTimeOptimisation="0" targetName="paulstretchplugin" headerPath="Source/PS_Source Source/WDL "
|
||||
libraryPath="/usr/local/Cellar/fftw/3.3.6-pl2/lib" cppLibType="libc++"
|
||||
osxArchitecture="64BitIntel" osxCompatibility="10.9 SDK"/>
|
||||
<CONFIGURATION name="Release" enablePluginBinaryCopyStep="1" isDebug="0" optimisation="3"
|
||||
linkTimeOptimisation="1" targetName="paulstretchplugin" headerPath="Source/PS_Source Source/WDL "/>
|
||||
linkTimeOptimisation="1" targetName="paulstretchplugin" headerPath="Source/PS_Source Source/WDL "
|
||||
osxCompatibility="10.9 SDK" osxArchitecture="64BitIntel" cppLibType="libc++"
|
||||
libraryPath="/usr/local/Cellar/fftw/3.3.6-pl2/lib"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
<MODULEPATH id="juce_core" path="../JUCE/modules"/>
|
||||
@ -84,7 +88,7 @@
|
||||
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins"/>
|
||||
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
|
||||
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="1"
|
||||
linkTimeOptimisation="0" isDebug="0" optimisation="3" targetName="paulstretchplugin"
|
||||
linkTimeOptimisation="1" isDebug="0" optimisation="3" targetName="paulstretchplugin"
|
||||
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
|
Loading…
Reference in New Issue
Block a user