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:
event:
- tag
name: Build paulxstretch
trigger:
branch:
@ -32,6 +33,20 @@ steps:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
- 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
image: ubuntu

3
.gitmodules vendored
View File

@ -1,6 +1,7 @@
[submodule "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"]
path = deps/clap-juce-extensions
url = https://github.com/free-audio/clap-juce-extensions.git

View File

@ -1,5 +1,11 @@
## 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**
- Update JUCE to 7.0.2
- Started using submodules for deps

View File

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

View File

@ -102,7 +102,7 @@ public:
virtual void createPlugin()
{
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone));
processor = createPluginFilterOfType (AudioProcessor::wrapperType_Standalone);
#else
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);
processor.reset (createPluginFilter());
@ -524,11 +524,9 @@ private:
};
//==============================================================================
void audioDeviceIOCallback (const float** inputChannelData,
int numInputChannels,
float** outputChannelData,
int numOutputChannels,
int numSamples) override
void audioDeviceIOCallbackWithContext (const float* const* inputChannelData, int numInputChannels,
float* const* outputChannelData, int numOutputChannels,
int numSamples, const AudioIODeviceCallbackContext& context) override
{
const bool inputMuted = shouldMuteInput.getValue();
@ -538,8 +536,8 @@ private:
inputChannelData = emptyBuffer.getArrayOfReadPointers();
}
player.audioDeviceIOCallback (inputChannelData, numInputChannels,
outputChannelData, numOutputChannels, numSamples);
player.audioDeviceIOCallbackWithContext (inputChannelData, numInputChannels,
outputChannelData, numOutputChannels, numSamples, context);
}
void audioDeviceAboutToStart (AudioIODevice* device) override
@ -644,8 +642,8 @@ public:
: DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton),
optionsButton ("Options")
{
#if JUCE_IOS || JUCE_ANDROID
setTitleBarHeight (0);
#else
@ -658,7 +656,7 @@ public:
#endif
setResizable (true, false);
pluginHolder.reset (new StandalonePluginHolder (settingsToUse, takeOwnershipOfSettings,
preferredDefaultDeviceName, preferredSetupOptions,
constrainToConfiguration, autoOpenMidiDevices));
@ -770,7 +768,7 @@ public:
std::unique_ptr<StandalonePluginHolder> pluginHolder;
private:
//==============================================================================
class MainContentComponent : public Component,
@ -829,7 +827,7 @@ private:
}
void resized() override
{
{
auto r = getLocalBounds();
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
#if JUCE_IOS
Timer::callAfterDelay(150, [this]() {
this->resized();
this->resized();
});
//return;
#endif
@ -862,18 +860,18 @@ private:
r.removeFromBottom(bottomInset);
r.removeFromLeft(leftInset);
r.removeFromRight(rightInset);
if (shouldShowNotification) {
notification.setBounds (r.removeFromTop (NotificationArea::height));
topInset += NotificationArea::height;
notification.setBounds (r.removeFromTop (NotificationArea::height));
topInset += NotificationArea::height;
}
editor->setBounds (r);
}
private:
bool isPortrait = false;
bool isTall = false;
int orientation = 0;
@ -968,7 +966,7 @@ private:
int bottomInset = 0;
int leftInset = 0;
int rightInset = 0;
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()));
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));
Range<int64_t> possiblerange(pos, pos + m_readbuf.getNumSamples() + 0);
m_cached_file_range = activerange.getIntersectionWith(possiblerange);
@ -154,7 +154,7 @@ public:
++m_silenceoutputted;
return 0.0f;
};
float** smps = abuf.getArrayOfWritePointers();
float* const* smps = abuf.getArrayOfWritePointers();
int readinc = 1;
if (m_reverseplay)
readinc = -1;
@ -212,7 +212,7 @@ public:
for (int j = 0; j < numchans; ++j)
{
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);
}
@ -224,7 +224,7 @@ public:
{
m_currentsample = subsect_t0+xfadelen;
++m_loopcount;
}
}
else if (m_reverseplay == true && m_currentsample < subsect_t0)
{
m_currentsample = subsect_t1 - 1;
@ -237,7 +237,7 @@ public:
PlayRangeEndCallback(this);
}
}
return nsmps;
}
void seekImpl(double pos)
@ -282,7 +282,7 @@ public:
}
m_seekfade.length = 16384;
m_seekfade.requestedpos = pos;
}
std::pair<Range<double>,Range<double>> getCachedRangesNormalized()
@ -322,7 +322,7 @@ public:
void setActiveRange(Range<double> rng) override
{
ScopedLock locker(m_mutex);
/*
if (rng.contains(getCurrentPositionPercent()))
{
@ -373,7 +373,7 @@ public:
}
bool isReversed() { return m_reverseplay; }
int64_t getLoopCount() { return m_loopcount; }
private:
std::function<void(AInputS*)> PlayRangeEndCallback;
std::unique_ptr<AudioFormatReader> m_afreader;

View File

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

View File

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

2
deps/juce vendored

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