Build with JUCE 7.0.6

This commit is contained in:
Nikolai Rodionov 2023-08-17 17:18:38 +02:00
parent 41e0f78edd
commit 3c4baf43da
No known key found for this signature in database
GPG Key ID: 906851F91B1DA3EF
11 changed files with 84 additions and 64 deletions

View File

@ -6,6 +6,7 @@ name: Release paulxstretch
trigger: trigger:
event: event:
- tag - tag
name: Build paulxstretch
trigger: trigger:
branch: branch:
@ -32,6 +33,20 @@ steps:
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
- git submodule update --init --recursive --progress - git submodule update --init --recursive --progress
- git submodule update --init --recursive
- name: Build and push the docker image
image: plugins/docker
when:
branch:
- dev
settings:
registry: git.badhouseplants.net
username: allanger
password:
from_secret: GITEA_TOKEN
repo: git.badhouseplants.net/${DRONE_REPO}
dockerfile: Containerfile
tags: latest
- name: Build the Linux version - name: Build the Linux version
image: ubuntu image: ubuntu

3
.gitmodules vendored
View File

@ -1,6 +1,7 @@
[submodule "deps/juce"] [submodule "deps/juce"]
path = deps/juce path = deps/juce
url = https://github.com/juce-framework/JUCE.git url = https://github.com/juce-framework/JUCE.git
branch = 7.0.6
[submodule "deps/clap-juce-extensions"] [submodule "deps/clap-juce-extensions"]
path = deps/clap-juce-extensions path = deps/clap-juce-extensions
url = https://github.com/free-audio/clap-juce-extensions.git url = https://github.com/free-audio/clap-juce-extensions.git

View File

@ -1,5 +1,11 @@
## PaulXStretch Change History ## PaulXStretch Change History
**v1.7.1** (2023-09-18)
- Updated JUCE to 7.0.6, so the linux VST versions can be open in DAW
- Temporarily dropped support for CLAP
- Switched to git submodules to track deps
**v1.7.0** **v1.7.0**
- Update JUCE to 7.0.2 - Update JUCE to 7.0.2
- Started using submodules for deps - Started using submodules for deps

View File

@ -3,11 +3,11 @@
#include "../JuceLibraryCode/JuceHeader.h" #include "../JuceLibraryCode/JuceHeader.h"
#include "juce_core/system/juce_TargetPlatform.h" #include "juce_core/system/juce_TargetPlatform.h"
#include "juce_audio_plugin_client/utility/juce_CheckSettingMacros.h" #include "juce_audio_plugin_client/detail/juce_CheckSettingMacros.h"
#include "juce_audio_plugin_client/utility/juce_IncludeSystemHeaders.h" #include "juce_audio_plugin_client/detail/juce_IncludeSystemHeaders.h"
#include "juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h" #include "juce_audio_plugin_client/detail/juce_IncludeModuleHeaders.h"
#include "juce_audio_plugin_client/utility/juce_WindowsHooks.h" #include "juce_gui_basics/native/juce_WindowsHooks_windows.h"
#include <juce_audio_devices/juce_audio_devices.h> #include <juce_audio_devices/juce_audio_devices.h>
#include <juce_gui_extra/juce_gui_extra.h> #include <juce_gui_extra/juce_gui_extra.h>
@ -50,7 +50,7 @@ public:
appProperties.setStorageParameters (options); appProperties.setStorageParameters (options);
LookAndFeel::setDefaultLookAndFeel(&sonoLNF); LookAndFeel::setDefaultLookAndFeel(&sonoLNF);
} }
const String getApplicationName() override { return JucePlugin_Name; } const String getApplicationName() override { return JucePlugin_Name; }
@ -71,7 +71,7 @@ public:
CustomLookAndFeel sonoLNF; CustomLookAndFeel sonoLNF;
virtual StandaloneFilterWindow* createWindow() virtual StandaloneFilterWindow* createWindow()
{ {
#ifdef JucePlugin_PreferredChannelConfigurations #ifdef JucePlugin_PreferredChannelConfigurations
@ -80,7 +80,7 @@ public:
AudioDeviceManager::AudioDeviceSetup setupOptions; AudioDeviceManager::AudioDeviceSetup setupOptions;
setupOptions.bufferSize = 512; setupOptions.bufferSize = 512;
return new StandaloneFilterWindow (getApplicationName(), return new StandaloneFilterWindow (getApplicationName(),
LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId),
appProperties.getUserSettings(), appProperties.getUserSettings(),
@ -106,7 +106,7 @@ public:
#endif #endif
mainWindow->setVisible (true); mainWindow->setVisible (true);
Desktop::getInstance().setScreenSaverEnabled(false); Desktop::getInstance().setScreenSaverEnabled(false);
} }
@ -117,7 +117,7 @@ public:
mainWindow->pluginHolder->savePluginState(); mainWindow->pluginHolder->savePluginState();
mainWindow->pluginHolder->saveAudioDeviceState(); mainWindow->pluginHolder->saveAudioDeviceState();
} }
mainWindow = nullptr; mainWindow = nullptr;
appProperties.saveIfNeeded(); appProperties.saveIfNeeded();
} }
@ -142,9 +142,9 @@ public:
appProperties.saveIfNeeded(); appProperties.saveIfNeeded();
Desktop::getInstance().setScreenSaverEnabled(true); Desktop::getInstance().setScreenSaverEnabled(true);
} }
void resumed() override void resumed() override
{ {
Desktop::getInstance().setScreenSaverEnabled(false); Desktop::getInstance().setScreenSaverEnabled(false);
@ -159,7 +159,7 @@ public:
mainWindow->getDeviceManager().restartLastAudioDevice(); mainWindow->getDeviceManager().restartLastAudioDevice();
} }
} }
//============================================================================== //==============================================================================
void systemRequestedQuit() override void systemRequestedQuit() override
{ {
@ -189,7 +189,7 @@ public:
{ {
DBG("Memory warning"); DBG("Memory warning");
} }
protected: protected:
ApplicationProperties appProperties; ApplicationProperties appProperties;
std::unique_ptr<StandaloneFilterWindow> mainWindow; std::unique_ptr<StandaloneFilterWindow> mainWindow;

View File

@ -102,7 +102,7 @@ public:
virtual void createPlugin() virtual void createPlugin()
{ {
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone)); processor = createPluginFilterOfType (AudioProcessor::wrapperType_Standalone);
#else #else
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone); AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);
processor.reset (createPluginFilter()); processor.reset (createPluginFilter());
@ -524,11 +524,9 @@ private:
}; };
//============================================================================== //==============================================================================
void audioDeviceIOCallback (const float** inputChannelData, void audioDeviceIOCallbackWithContext (const float* const* inputChannelData, int numInputChannels,
int numInputChannels, float* const* outputChannelData, int numOutputChannels,
float** outputChannelData, int numSamples, const AudioIODeviceCallbackContext& context) override
int numOutputChannels,
int numSamples) override
{ {
const bool inputMuted = shouldMuteInput.getValue(); const bool inputMuted = shouldMuteInput.getValue();
@ -538,8 +536,8 @@ private:
inputChannelData = emptyBuffer.getArrayOfReadPointers(); inputChannelData = emptyBuffer.getArrayOfReadPointers();
} }
player.audioDeviceIOCallback (inputChannelData, numInputChannels, player.audioDeviceIOCallbackWithContext (inputChannelData, numInputChannels,
outputChannelData, numOutputChannels, numSamples); outputChannelData, numOutputChannels, numSamples, context);
} }
void audioDeviceAboutToStart (AudioIODevice* device) override void audioDeviceAboutToStart (AudioIODevice* device) override
@ -644,8 +642,8 @@ public:
: DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton), : DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton),
optionsButton ("Options") optionsButton ("Options")
{ {
#if JUCE_IOS || JUCE_ANDROID #if JUCE_IOS || JUCE_ANDROID
setTitleBarHeight (0); setTitleBarHeight (0);
#else #else
@ -658,7 +656,7 @@ public:
#endif #endif
setResizable (true, false); setResizable (true, false);
pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings, pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,
preferredDefaultDeviceName, preferredSetupOptions, preferredDefaultDeviceName, preferredSetupOptions,
constrainToConfiguration, autoOpenMidiDevices)); constrainToConfiguration, autoOpenMidiDevices));
@ -770,7 +768,7 @@ public:
std::unique_ptr<StandalonePluginHolder> pluginHolder; std::unique_ptr<StandalonePluginHolder> pluginHolder;
private: private:
//============================================================================== //==============================================================================
class MainContentComponent : public Component, class MainContentComponent : public Component,
@ -829,7 +827,7 @@ private:
} }
void resized() override void resized() override
{ {
auto r = getLocalBounds(); auto r = getLocalBounds();
bool portrait = getWidth() < getHeight(); bool portrait = getWidth() < getHeight();
@ -847,7 +845,7 @@ private:
// call resized again if on iOS, due to dumb stuff related to safe area insets not being updated // call resized again if on iOS, due to dumb stuff related to safe area insets not being updated
#if JUCE_IOS #if JUCE_IOS
Timer::callAfterDelay(150, [this]() { Timer::callAfterDelay(150, [this]() {
this->resized(); this->resized();
}); });
//return; //return;
#endif #endif
@ -862,18 +860,18 @@ private:
r.removeFromBottom(bottomInset); r.removeFromBottom(bottomInset);
r.removeFromLeft(leftInset); r.removeFromLeft(leftInset);
r.removeFromRight(rightInset); r.removeFromRight(rightInset);
if (shouldShowNotification) { if (shouldShowNotification) {
notification.setBounds (r.removeFromTop (NotificationArea::height)); notification.setBounds (r.removeFromTop (NotificationArea::height));
topInset += NotificationArea::height; topInset += NotificationArea::height;
} }
editor->setBounds (r); editor->setBounds (r);
} }
private: private:
bool isPortrait = false; bool isPortrait = false;
bool isTall = false; bool isTall = false;
int orientation = 0; int orientation = 0;
@ -968,7 +966,7 @@ private:
int bottomInset = 0; int bottomInset = 0;
int leftInset = 0; int leftInset = 0;
int rightInset = 0; int rightInset = 0;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
}; };

View File

@ -123,7 +123,7 @@ public:
return m_readbuf.getSample(ch, int(pos - m_cached_file_range.getStart())); return m_readbuf.getSample(ch, int(pos - m_cached_file_range.getStart()));
else else
{ {
Range<int64_t> activerange((int64_t)(m_activerange.getStart()*info.nsamples), Range<int64_t> activerange((int64_t)(m_activerange.getStart()*info.nsamples),
(int64_t)(m_activerange.getEnd()*info.nsamples+1)); (int64_t)(m_activerange.getEnd()*info.nsamples+1));
Range<int64_t> possiblerange(pos, pos + m_readbuf.getNumSamples() + 0); Range<int64_t> possiblerange(pos, pos + m_readbuf.getNumSamples() + 0);
m_cached_file_range = activerange.getIntersectionWith(possiblerange); m_cached_file_range = activerange.getIntersectionWith(possiblerange);
@ -154,7 +154,7 @@ public:
++m_silenceoutputted; ++m_silenceoutputted;
return 0.0f; return 0.0f;
}; };
float** smps = abuf.getArrayOfWritePointers(); float* const* smps = abuf.getArrayOfWritePointers();
int readinc = 1; int readinc = 1;
if (m_reverseplay) if (m_reverseplay)
readinc = -1; readinc = -1;
@ -212,7 +212,7 @@ public:
for (int j = 0; j < numchans; ++j) for (int j = 0; j < numchans; ++j)
{ {
int inchantouse = j % inchans; int inchantouse = j % inchans;
smps[j][i] = seekfadegain*getCrossFadedSampleLambda(m_currentsample, inchantouse, smps[j][i] = seekfadegain*getCrossFadedSampleLambda(m_currentsample, inchantouse,
subsect_t0, subsect_t1,xfadelen); subsect_t0, subsect_t1,xfadelen);
} }
@ -224,7 +224,7 @@ public:
{ {
m_currentsample = subsect_t0+xfadelen; m_currentsample = subsect_t0+xfadelen;
++m_loopcount; ++m_loopcount;
} }
else if (m_reverseplay == true && m_currentsample < subsect_t0) else if (m_reverseplay == true && m_currentsample < subsect_t0)
{ {
m_currentsample = subsect_t1 - 1; m_currentsample = subsect_t1 - 1;
@ -237,7 +237,7 @@ public:
PlayRangeEndCallback(this); PlayRangeEndCallback(this);
} }
} }
return nsmps; return nsmps;
} }
void seekImpl(double pos) void seekImpl(double pos)
@ -282,7 +282,7 @@ public:
} }
m_seekfade.length = 16384; m_seekfade.length = 16384;
m_seekfade.requestedpos = pos; m_seekfade.requestedpos = pos;
} }
std::pair<Range<double>,Range<double>> getCachedRangesNormalized() std::pair<Range<double>,Range<double>> getCachedRangesNormalized()
@ -322,7 +322,7 @@ public:
void setActiveRange(Range<double> rng) override void setActiveRange(Range<double> rng) override
{ {
ScopedLock locker(m_mutex); ScopedLock locker(m_mutex);
/* /*
if (rng.contains(getCurrentPositionPercent())) if (rng.contains(getCurrentPositionPercent()))
{ {
@ -373,7 +373,7 @@ public:
} }
bool isReversed() { return m_reverseplay; } bool isReversed() { return m_reverseplay; }
int64_t getLoopCount() { return m_loopcount; } int64_t getLoopCount() { return m_loopcount; }
private: private:
std::function<void(AInputS*)> PlayRangeEndCallback; std::function<void(AInputS*)> PlayRangeEndCallback;
std::unique_ptr<AudioFormatReader> m_afreader; std::unique_ptr<AudioFormatReader> m_afreader;

View File

@ -316,7 +316,7 @@ void StretchAudioSource::getNextAudioBlock(const AudioSourceChannelInfo & buffer
if (m_vol_smoother.getTargetValue() != maingain) if (m_vol_smoother.getTargetValue() != maingain)
m_vol_smoother.setTargetValue(maingain); m_vol_smoother.setTargetValue(maingain);
FloatVectorOperations::disableDenormalisedNumberSupport(); FloatVectorOperations::disableDenormalisedNumberSupport();
float** outarrays = bufferToFill.buffer->getArrayOfWritePointers(); float* const* outarrays = bufferToFill.buffer->getArrayOfWritePointers();
int outbufchans = jmin(m_num_outchans, bufferToFill.buffer->getNumChannels()); int outbufchans = jmin(m_num_outchans, bufferToFill.buffer->getNumChannels());
int offset = bufferToFill.startSample; int offset = bufferToFill.startSample;
if (m_stretchers.size() == 0) if (m_stretchers.size() == 0)

View File

@ -52,7 +52,7 @@ public:
SpectralVisualizer(); SpectralVisualizer();
void setState(const ProcessParameters& pars, int nfreqs, double samplerate); void setState(const ProcessParameters& pars, int nfreqs, double samplerate);
void paint(Graphics& g) override; void paint(Graphics& g) override;
private: private:
Image m_img; Image m_img;
std::vector<REALTYPE> m_insamples,m_freqs1, m_freqs2, m_freqs3; std::vector<REALTYPE> m_insamples,m_freqs1, m_freqs2, m_freqs3;
@ -174,10 +174,10 @@ private:
class MyThumbCache : public AudioThumbnailCache class MyThumbCache : public AudioThumbnailCache
{ {
public: public:
MyThumbCache() : AudioThumbnailCache(200) MyThumbCache() : AudioThumbnailCache(200)
{ {
// The default priority of 2 is a bit too low in some cases, it seems... // The default priority of 2 is a bit too low in some cases, it seems...
getTimeSliceThread().setPriority(3); //getTimeSliceThread().setPriority(juce::Thread::Priority::highest);
} }
~MyThumbCache() {} ~MyThumbCache() {}
}; };
@ -328,11 +328,11 @@ public:
void currentTabChanged(int newCurrentTabIndex, const String&) override void currentTabChanged(int newCurrentTabIndex, const String&) override
{ {
//m_cur_tab = newCurrentTabIndex; //m_cur_tab = newCurrentTabIndex;
} }
private: private:
int& m_cur_tab; int& m_cur_tab;
}; };
class SimpleFFTComponent : public Component, class SimpleFFTComponent : public Component,
@ -346,15 +346,15 @@ public:
{ {
setOpaque(true); setOpaque(true);
startTimerHz(60); startTimerHz(60);
} }
~SimpleFFTComponent() ~SimpleFFTComponent()
{ {
} }
void addAudioBlock(const AudioBuffer<float>& bufferToFill) void addAudioBlock(const AudioBuffer<float>& bufferToFill)
{ {
if (bufferToFill.getNumChannels() > 0) if (bufferToFill.getNumChannels() > 0)
{ {
@ -447,7 +447,7 @@ private:
int fifoIndex = 0; int fifoIndex = 0;
bool nextFFTBlockReady = false; bool nextFFTBlockReady = false;
}; };
@ -511,7 +511,7 @@ private:
LookAndFeel_V3 m_filebwlookandfeel; LookAndFeel_V3 m_filebwlookandfeel;
}; };
class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor, class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor,
public MultiTimer, public FileDragAndDropTarget, public DragAndDropContainer, public ComponentListener public MultiTimer, public FileDragAndDropTarget, public DragAndDropContainer, public ComponentListener
{ {
@ -535,7 +535,7 @@ public:
void paint (Graphics&) override; void paint (Graphics&) override;
void resized() override; void resized() override;
void timerCallback(int id) override; void timerCallback(int id) override;
bool isInterestedInFileDrag(const StringArray &files) override; bool isInterestedInFileDrag(const StringArray &files) override;
void filesDropped(const StringArray &files, int x, int y) override; void filesDropped(const StringArray &files, int x, int y) override;
@ -543,9 +543,9 @@ public:
void componentParentHierarchyChanged (Component& component) override; void componentParentHierarchyChanged (Component& component) override;
WaveformComponent m_wavecomponent; WaveformComponent m_wavecomponent;
void showRenderDialog(); void showRenderDialog();
//SimpleFFTComponent m_sonogram; //SimpleFFTComponent m_sonogram;
String m_last_err; String m_last_err;
@ -566,7 +566,7 @@ private:
void showPopTip(const String & message, int timeoutMs, Component * target, int maxwidth=100); void showPopTip(const String & message, int timeoutMs, Component * target, int maxwidth=100);
CustomLookAndFeel m_lookandfeel; CustomLookAndFeel m_lookandfeel;
PaulstretchpluginAudioProcessor& processor; PaulstretchpluginAudioProcessor& processor;
@ -600,18 +600,18 @@ private:
WeakReference<Component> settingsCalloutBox; WeakReference<Component> settingsCalloutBox;
std::unique_ptr<OptionsView> m_optionsView; std::unique_ptr<OptionsView> m_optionsView;
zoom_scrollbar m_zs; zoom_scrollbar m_zs;
RatioMixerEditor m_ratiomixeditor{ 8 }; RatioMixerEditor m_ratiomixeditor{ 8 };
FreeFilterComponent m_free_filter_component; FreeFilterComponent m_free_filter_component;
MyTabComponent m_wavefilter_tab; MyTabComponent m_wavefilter_tab;
Component* m_wave_container=nullptr; Component* m_wave_container=nullptr;
void showAudioSetup(); void showAudioSetup();
void showSettings(bool flag); void showSettings(bool flag);
void toggleFileBrowser(); void toggleFileBrowser();
std::vector<int> m_capturelens{ 2,5,10,30,60,120 }; std::vector<int> m_capturelens{ 2,5,10,30,60,120 };
std::unique_ptr<MyFileBrowserComponent> m_filechooser; std::unique_ptr<MyFileBrowserComponent> m_filechooser;
std::unique_ptr<FileChooser> fileChooser; std::unique_ptr<FileChooser> fileChooser;
WildcardFileFilter m_filefilter; WildcardFileFilter m_filefilter;
@ -645,7 +645,7 @@ private:
// keep this down here, so it gets destroyed early // keep this down here, so it gets destroyed early
std::unique_ptr<BubbleMessageComponent> popTip; std::unique_ptr<BubbleMessageComponent> popTip;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor)
}; };

View File

@ -616,8 +616,8 @@ void PaulstretchpluginAudioProcessor::startplay(Range<double> playrange, int num
m_recreate_buffering_source = false; m_recreate_buffering_source = false;
} }
if (m_bufferingthread.isThreadRunning() == false) { if (m_bufferingthread.isThreadRunning() == false) {
m_bufferingthread.setPriority(8);
m_bufferingthread.startThread(); m_bufferingthread.startThread();
// m_bufferingthread.setPriority(juce::Thread::Priority::high);
} }
m_stretch_source->setNumOutChannels(numoutchans); m_stretch_source->setNumOutChannels(numoutchans);
m_stretch_source->setFFTSize(m_fft_size_to_use, true); m_stretch_source->setFFTSize(m_fft_size_to_use, true);

2
deps/juce vendored

@ -1 +1 @@
Subproject commit 965d0ca4be178c4a0000b116d460e15c30311992 Subproject commit d24c2729268e322f3ba1b5070eb96ab232d7f6ba