File PolarDesigner-linux-compile-fix.patch of Package PolarDesigner
diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp
index 6f3823a..cb8aadc 100644
--- a/Source/PluginProcessor.cpp
+++ b/Source/PluginProcessor.cpp
@@ -21,6 +21,7 @@
==============================================================================
*/
+#include <cmath>
#include "PluginProcessor.h"
#include "PluginEditor.h"
@@ -175,7 +176,7 @@ PolarDesignerAudioProcessor::PolarDesignerAudioProcessor() :
ffEqEightBuffer.copyFrom(0, 0, FFEQ_COEFFS_EIGHT, FF_EQ_LEN);
updateLatency();
- delay.setDelayTime (std::ceilf(static_cast<float>(FILTER_BANK_IR_LENGTH_AT_NATIVE_SAMPLE_RATE) / 2 - 1) / FILTER_BANK_NATIVE_SAMPLE_RATE);
+ delay.setDelayTime (ceilf(static_cast<float>(FILTER_BANK_IR_LENGTH_AT_NATIVE_SAMPLE_RATE) / 2 - 1) / FILTER_BANK_NATIVE_SAMPLE_RATE);
oldProxDistance = proxDistance->load();
@@ -811,7 +812,7 @@ void PolarDesignerAudioProcessor::computeFilterCoefficients(int crossoverNr)
{
float fCenter = halfBandwidth + hzFromZeroToOne(i-1, xOverFreqs[i-1]->load());
// write bandpass transformed fir coeffs to buffer
- *(filterBufferPointer+j) = 2 * *(lp2bpCoeffs+j) * std::cosf(MathConstants<float>::twoPi * fCenter / currentSampleRate * (j - (firLen - 1) / 2));
+ *(filterBufferPointer+j) = 2 * *(lp2bpCoeffs+j) * cosf(MathConstants<float>::twoPi * fCenter / currentSampleRate * (j - (firLen - 1) / 2));
}
}
@@ -824,7 +825,7 @@ void PolarDesignerAudioProcessor::computeFilterCoefficients(int crossoverNr)
float* lp2hpCoeffs = lp2hp->getRawCoefficients();
for (int i=0; i<firLen; ++i) // highpass transform
{
- *(filterBufferPointer+i) = *(lp2hpCoeffs+i) * std::cosf(MathConstants<float>::pi * (i - (firLen - 1) / 2));
+ *(filterBufferPointer+i) = *(lp2hpCoeffs+i) * cosf(MathConstants<float>::pi * (i - (firLen - 1) / 2));
}
}
@@ -1487,7 +1488,7 @@ void PolarDesignerAudioProcessor::updateLatency() {
{
// set delay compensation to FIR_LEN/2-1 if FIR_LEN even and FIR_LEN/2 if odd
if (zeroDelayMode->load() < 0.5f)
- setLatencySamples(std::ceilf(static_cast<float>(firLen) / 2 - 1));
+ setLatencySamples(ceilf(static_cast<float>(firLen) / 2 - 1));
else
setLatencySamples(0);
}
diff --git a/resources/customComponents/EndlessSlider.h b/resources/customComponents/EndlessSlider.h
index 7d3ca8e..2bbfd0a 100644
--- a/resources/customComponents/EndlessSlider.h
+++ b/resources/customComponents/EndlessSlider.h
@@ -109,7 +109,7 @@ private:
ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile));
return std::unique_ptr<InputStream> (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))));
#else
-#if JUCE_IOS || JUCE_MAC
+#if JUCE_IOS || JUCE_MAC || JUCE_LINUX
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
.getParentDirectory().getChildFile ("Assets");
#endif
diff --git a/resources/customComponents/TitleBar.h b/resources/customComponents/TitleBar.h
index 060d0e9..f5dfc69 100644
--- a/resources/customComponents/TitleBar.h
+++ b/resources/customComponents/TitleBar.h
@@ -257,7 +257,8 @@ public:
};
private:
- std::unique_ptr<ComboBox> cbChannels;
+ //std::unique_ptr<ComboBox> cbChannels;
+ juce::ComboBox* cbChannels;
Path WaveformPath;
int availableChannels {64};
int channelSizeIfNotSelectable = maxChannels;