From 92afde28191889c919196b52554a2d1514e5f9ff Mon Sep 17 00:00:00 2001 From: virgil9306 Date: Sat, 6 Dec 2025 12:49:17 +0900 Subject: [PATCH 1/2] Fixing some calls to deprecated functions --- CMakeLists.txt | 2 +- Common/Source/WindowHelper.mm | 2 +- JUCE | 2 +- Plugin/Source/Client.cpp | 12 ++++++------ Plugin/Source/PluginEditor.cpp | 19 ++++++++++++------- Plugin/Source/PluginProcessor.cpp | 8 ++++---- Plugin/Source/PluginProcessor.hpp | 2 +- PluginTray/Source/App.cpp | 2 +- Server/Source/PluginListWindow.cpp | 9 ++++++++- Server/Source/Processor.cpp | 8 +++++++- Server/Source/ProcessorWindow.hpp | 2 +- 11 files changed, 43 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52ecb07..39bf7f5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ set(AG_AAX_SDK_DEFAULT "${AG_SDKS_ROOT}/aax-sdk") set(AG_AAX_SDK ${AG_AAX_SDK_DEFAULT} CACHE STRING "AAX SDK Folder") if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(AG_MACOS_TARGET 10.8 CACHE STRING "macOS target, default is 10.8") + set(AG_MACOS_TARGET 14.0 CACHE STRING "macOS target, default is 10.8") set(CMAKE_OSX_DEPLOYMENT_TARGET ${AG_MACOS_TARGET}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) diff --git a/Common/Source/WindowHelper.mm b/Common/Source/WindowHelper.mm index 9187952..66a964e 100644 --- a/Common/Source/WindowHelper.mm +++ b/Common/Source/WindowHelper.mm @@ -11,7 +11,7 @@ #include "WindowHelper.hpp" -#include +#include namespace e47 { namespace WindowHelper { diff --git a/JUCE b/JUCE index 05ca58e..1a66a03 160000 --- a/JUCE +++ b/JUCE @@ -1 +1 @@ -Subproject commit 05ca58e0c451b858ec0e224ffb1db178f0442b54 +Subproject commit 1a66a0310325787c614ef92217c2dfa24eb23e5a diff --git a/Plugin/Source/Client.cpp b/Plugin/Source/Client.cpp index b5d9fa4..c6d666f 100644 --- a/Plugin/Source/Client.cpp +++ b/Plugin/Source/Client.cpp @@ -346,7 +346,7 @@ void Client::init() { if (useUnixDomain) { auto socketPath = Defaults::getSocketPath(Defaults::SERVER_SOCK, {{"id", String(srvInfo.getID())}}); logln("connecting server: " << socketPath.getFullPathName()); - if (!m_cmdOut->connect(socketPath, 1000)) { + if (!m_cmdOut->connect(socketPath.getFullPathName(), 1000)) { logln("local connection to server failed"); useUnixDomain = false; } @@ -397,7 +397,7 @@ void Client::init() { workerSocketPath = Defaults::getSocketPath(Defaults::WORKER_SOCK, {{"id", String(srvInfo.getID())}, {"n", String(resp.port)}}); logln("connecting worker: " << workerSocketPath.getFullPathName()); - m_cmdOut->connect(workerSocketPath); + m_cmdOut->connect(workerSocketPath.getFullPathName(), 1000); } else { logln("connecting worker: " << srvInfo.getHost() << ":" << resp.port); m_cmdOut->connect(srvInfo.getHost(), resp.port); @@ -410,7 +410,7 @@ void Client::init() { } m_cmdIn = std::make_unique(); - if (useUnixDomain ? !m_cmdIn->connect(workerSocketPath) : !m_cmdIn->connect(srvInfo.getHost(), resp.port)) { + if (useUnixDomain ? !m_cmdIn->connect(workerSocketPath.getFullPathName(), 1000) : !m_cmdIn->connect(srvInfo.getHost(), resp.port)) { logln("failed to setup command receive connection"); m_cmdIn.reset(); } @@ -418,14 +418,14 @@ void Client::init() { StreamingSocket* audioSock = nullptr; audioSock = new StreamingSocket; - if (useUnixDomain ? !audioSock->connect(workerSocketPath) : !audioSock->connect(srvInfo.getHost(), resp.port)) { + if (useUnixDomain ? !audioSock->connect(workerSocketPath.getFullPathName(), 1000) : !audioSock->connect(srvInfo.getHost(), resp.port)) { logln("failed to setup audio connection"); delete audioSock; audioSock = nullptr; } m_screenSocket = std::make_unique(); - if (useUnixDomain ? !m_screenSocket->connect(workerSocketPath) + if (useUnixDomain ? !m_screenSocket->connect(workerSocketPath.getFullPathName(), 1000) : !m_screenSocket->connect(srvInfo.getHost(), resp.port)) { logln("failed to setup screen connection"); m_screenSocket.reset(); @@ -434,7 +434,7 @@ void Client::init() { if (nullptr != audioSock) { logln("audio connection established"); RealtimeOptions opts; - opts.workDurationMs = (uint32)round(m_samplesPerBlock / m_sampleRate * 1000) - 1; + opts = opts.withPeriodMs((double) (round(m_samplesPerBlock / m_sampleRate * 1000) - 1)); std::lock_guard audiolck(m_audioMtx); if (m_doublePrecission) { m_audioStreamerD = std::make_shared>(this, audioSock); diff --git a/Plugin/Source/PluginEditor.cpp b/Plugin/Source/PluginEditor.cpp index 6bc5665..bf0dc47 100644 --- a/Plugin/Source/PluginEditor.cpp +++ b/Plugin/Source/PluginEditor.cpp @@ -178,14 +178,19 @@ void PluginEditor::paint(Graphics& g) { FillType ft; auto colBG = getLookAndFeel().findColour(ResizableWindow::backgroundColourId); auto tp = m_processor.getTrackProperties(); - if (!tp.colour.isTransparent()) { - auto gradient = ColourGradient::horizontal(colBG.interpolatedWith(tp.colour, 0.05f), 0, colBG, 100); - g.setGradientFill(gradient); - g.fillAll(); - g.setColour(tp.colour); - g.fillRect(0, 0, 2, getHeight()); - } else { + if (tp.colourARGB.has_value()) { + juce::Colour trackColour = juce::Colour(tp.colourARGB.value()); + if (!trackColour.isTransparent()) { + juce::Colour colBG = findColour(juce::ResizableWindow::backgroundColourId); + auto gradient = ColourGradient::horizontal(colBG.interpolatedWith(trackColour, 0.05f), 0, colBG, 100); + g.setGradientFill(gradient); + g.setColour(trackColour); + g.fillRect(0, 0, getWidth(), (int)(getHeight() * 0.05)); // This assumption of how to draw might be incorrect + } else { g.fillAll(colBG); + } + } else { + g.fillAll(colBG); } } diff --git a/Plugin/Source/PluginProcessor.cpp b/Plugin/Source/PluginProcessor.cpp index 8e864e2..33be939 100644 --- a/Plugin/Source/PluginProcessor.cpp +++ b/Plugin/Source/PluginProcessor.cpp @@ -1793,7 +1793,7 @@ void PluginProcessor::TrayConnection::sendStatus() { json j; j["connected"] = isClientReady; - j["name"] = track.name.toStdString(); + j["name"] = track.name->toStdString(); j["channelsIn"] = m_processor->getMainBusNumInputChannels(); j["channelsOut"] = m_processor->getTotalNumOutputChannels(); j["channelsSC"] = m_processor->getBusCount(true) > 0 ? m_processor->getChannelCountOfBus(true, 1) : 0; @@ -1802,7 +1802,7 @@ void PluginProcessor::TrayConnection::sendStatus() { #else j["instrument"] = false; #endif - j["colour"] = track.colour.getARGB(); + j["colour"] = track.colourARGB.value_or(0); j["loadedPlugins"] = client.getLoadedPluginsString().toStdString(); j["loadedPluginsOk"] = m_processor->m_loadedPluginsOk.load(); j["perfStream"] = tsStream->getMostRecentAverage(); @@ -1868,9 +1868,9 @@ void PluginProcessor::TrayConnection::run() { if (!connected) { bool success; if (Defaults::unixDomainSocketsSupported()) { - success = connectToSocket(Defaults::getSocketPath(Defaults::PLUGIN_TRAY_SOCK), 500); + success = connectToSocket(Defaults::getSocketPath(Defaults::PLUGIN_TRAY_SOCK).getFullPathName(), Defaults::PLUGIN_TRAY_PORT, 500); // Assumption that port should be same as below } else { - success = connectToSocket("localhost", Defaults::PLUGIN_TRAY_PORT, 500); + success = connectToSocket("localhost", Defaults::PLUGIN_TRAY_PORT, 500); // 2nd arg is port -- we don't have that } if (!success) { String path = File::getSpecialLocation(File::globalApplicationsDirectory).getFullPathName(); diff --git a/Plugin/Source/PluginProcessor.hpp b/Plugin/Source/PluginProcessor.hpp index f0f53b5..f2e277a 100644 --- a/Plugin/Source/PluginProcessor.hpp +++ b/Plugin/Source/PluginProcessor.hpp @@ -55,7 +55,7 @@ class PluginProcessor : public AudioProcessor, public AudioProcessorParameter::L void releaseResources() override; bool isBusesLayoutSupported(const BusesLayout& layouts) const override; - Array> getAUChannelInfo() const override; + Array> getAUChannelInfo() const; bool canAddBus(bool /*isInput*/) const override { return true; } bool canRemoveBus(bool /*isInput*/) const override { return true; } diff --git a/PluginTray/Source/App.cpp b/PluginTray/Source/App.cpp index 42038f0..1bb45cd 100644 --- a/PluginTray/Source/App.cpp +++ b/PluginTray/Source/App.cpp @@ -24,7 +24,7 @@ void App::initialise(const String& /*commandLineParameters*/) { } } if (Defaults::unixDomainSocketsSupported()) { - if (!m_srv.beginWaitingForSocket(Defaults::getSocketPath(Defaults::PLUGIN_TRAY_SOCK, {}, true))) { + if (!m_srv.beginWaitingForSocket(0, Defaults::getSocketPath(Defaults::PLUGIN_TRAY_SOCK, {}, true).getFullPathName())) { quit(); return; } diff --git a/Server/Source/PluginListWindow.cpp b/Server/Source/PluginListWindow.cpp index 9e6030f..c5f3af8 100644 --- a/Server/Source/PluginListWindow.cpp +++ b/Server/Source/PluginListWindow.cpp @@ -9,6 +9,7 @@ #include "PluginListWindow.hpp" #include "Server.hpp" #include "WindowPositions.hpp" +#include namespace e47 { @@ -21,7 +22,13 @@ PluginListWindow::PluginListWindow(App* app, KnownPluginList& list, const String m_deadMansPedalFile(deadMansPedalFile) { if (auto srv = m_app->getServer()) { setUsingNativeTitleBar(true); - m_plugmgr.addDefaultFormats(); + + // See /modules/juce_audio_processors/format_types + // m_plugmgr.addFormat (new VSTPluginFormat()); // This fails/not found + m_plugmgr.addFormat (new VST3PluginFormat()); + m_plugmgr.addFormat (new AudioUnitPluginFormat()); + // m_plugmgr.addFormat (new AAXPluginFormat()); // This fails/not found + setContentOwned(new PluginListComponent(m_plugmgr, m_pluginlist, srv->getExcludeList(), m_deadMansPedalFile), true); diff --git a/Server/Source/Processor.cpp b/Server/Source/Processor.cpp index 2478cc0..bc17102 100644 --- a/Server/Source/Processor.cpp +++ b/Server/Source/Processor.cpp @@ -307,7 +307,13 @@ std::shared_ptr Processor::loadPlugin(const PluginDescripti traceScope(); String err2; AudioPluginFormatManager plugmgr; - plugmgr.addDefaultFormats(); + + // See /modules/juce_audio_processors/format_types + // plugmgr.addFormat (new VSTPluginFormat()); // This fails/not found + plugmgr.addFormat (new VST3PluginFormat()); + plugmgr.addFormat (new AudioUnitPluginFormat()); + // plugmgr.addFormat (new AAXPluginFormat()); // This fails/not found + #if JUCE_PLUGINHOST_LV2 if (plugdesc.pluginFormatName == "LV2") { AudioPluginFormat* fmt = new LV2PluginFormat(); diff --git a/Server/Source/ProcessorWindow.hpp b/Server/Source/ProcessorWindow.hpp index 96002b9..5ff4a78 100644 --- a/Server/Source/ProcessorWindow.hpp +++ b/Server/Source/ProcessorWindow.hpp @@ -29,7 +29,7 @@ class ProcessorWindow : public DocumentWindow, private Timer, public LogTag { ~ProcessorWindow() override; void closeButtonPressed() override; - BorderSize getBorderThickness() override { return {}; } + BorderSize getBorderThickness() const override { return {}; } void forgetEditor(); juce::Rectangle getScreenCaptureRect(); From de94182b058aff61df723e3c1c3e577365ae7c23 Mon Sep 17 00:00:00 2001 From: virgil9306 Date: Sat, 6 Dec 2025 16:53:00 +0900 Subject: [PATCH 2/2] compilation passes on Mac OS 15 with Xcode 16 --- Server/Source/ProcessorClient.cpp | 6 +++--- Server/Source/Server.cpp | 19 ++++++++++--------- Server/Source/Worker.cpp | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Server/Source/ProcessorClient.cpp b/Server/Source/ProcessorClient.cpp index cfa3ac7..1b97bdf 100644 --- a/Server/Source/ProcessorClient.cpp +++ b/Server/Source/ProcessorClient.cpp @@ -195,7 +195,7 @@ bool ProcessorClient::connectSandbox() { int maxTries = 100; while (!m_sockCmdOut->isConnected() && maxTries-- > 0 && m_process.isRunning()) { if (hasUnixDomainSockets) { - if (!m_sockCmdOut->connect(socketPath, 100)) { + if (!m_sockCmdOut->connect(socketPath.getFullPathName(), m_port, 100)) { sleep(100); } } else { @@ -209,7 +209,7 @@ bool ProcessorClient::connectSandbox() { m_sockCmdIn = std::make_unique(); if (hasUnixDomainSockets) { - if (!m_sockCmdIn->connect(socketPath)) { + if (!m_sockCmdIn->connect(socketPath.getFullPathName(), 0)) { setAndLogError("failed to setup sandbox command-in connection"); success = false; } @@ -236,7 +236,7 @@ bool ProcessorClient::connectSandbox() { m_sockAudio = std::make_unique(); if (hasUnixDomainSockets) { - if (!m_sockAudio->connect(socketPath)) { + if (!m_sockAudio->connect(socketPath.getFullPathName(), m_port)) { setAndLogError("failed to setup sandbox audio connection"); success = false; } diff --git a/Server/Source/Server.cpp b/Server/Source/Server.cpp index 47b8107..fd270e7 100644 --- a/Server/Source/Server.cpp +++ b/Server/Source/Server.cpp @@ -1197,13 +1197,13 @@ void Server::runServer() { if (getScreenLocalMode() && Defaults::unixDomainSocketsSupported()) { auto socketPath = Defaults::getSocketPath(Defaults::SERVER_SOCK, {{"id", String(getId())}}, true); logln("creating listener " << socketPath.getFullPathName()); - if (!m_masterSocketLocal.createListener(socketPath)) { + if (!m_masterSocketLocal.createListener(0, socketPath.getFullPathName())) { logln("failed to create local master listener"); } } logln("creating listener " << (m_host.length() == 0 ? "*" : m_host) << ":" << (m_port + getId())); - if (m_masterSocket.createListener6(m_port + getId(), m_host)) { + if (m_masterSocket.createListener(m_port + getId(), m_host)) { logln("server started: ID=" << getId() << ", PORT=" << m_port + getId() << ", NAME=" << m_name); while (!threadShouldExit()) { StreamingSocket* clnt = nullptr; @@ -1287,8 +1287,9 @@ void Server::runServer() { auto sandbox = std::make_shared(*this, id); logln("creating sandbox " << id); if (sandbox->launchWorkerProcess( - File::getSpecialLocation(File::currentExecutableFile), Defaults::SANDBOX_CMD_PREFIX, - {"-id", String(getId()), "-islocal", String((int)isLocal), "-clientid", id}, 3000, 30000)) { + File::getSpecialLocation(File::currentExecutableFile), + Defaults::SANDBOX_CMD_PREFIX, + 3000)) { sandbox->onPortReceived = [this, id, clnt](int sandboxPort) { traceScope(); if (!sendHandshakeResponse(clnt, true, sandboxPort)) { @@ -1399,7 +1400,7 @@ void Server::runSandboxChain() { m_sandboxController = std::make_unique(*this); if (!m_sandboxController->initialiseFromCommandLine(getOpt("commandLine", String()), Defaults::SANDBOX_CMD_PREFIX, - 10000, 30000)) { + 10000)) { logln("failed to initialize sandbox process"); getApp()->prepareShutdown(App::EXIT_SANDBOX_INIT_ERROR); return; @@ -1517,13 +1518,13 @@ void Server::runSandboxPlugin() { if (hasUnixDomainSockets) { socketPath = Defaults::getSocketPath(Defaults::SANDBOX_PLUGIN_SOCK, {{"n", String(m_port)}}, true); - if (!workerMasterSocket->createListener(socketPath)) { + if (!workerMasterSocket->createListener(0, socketPath.getFullPathName())) { logln("failed to create worker listener"); getApp()->prepareShutdown(App::EXIT_SANDBOX_BIND_ERROR); return; } } else { - if (!workerMasterSocket->createListener6(m_port, m_host)) { + if (!workerMasterSocket->createListener(m_port, m_host)) { logln("failed to create worker listener"); getApp()->prepareShutdown(App::EXIT_SANDBOX_BIND_ERROR); return; @@ -1586,10 +1587,10 @@ bool Server::createWorkerListener(std::shared_ptr sock, bool is Defaults::getSocketPath(Defaults::WORKER_SOCK, {{"id", String(getId())}, {"n", String(workerPort)}}); } while (socketPath.exists() && ++workerPort <= workerPortMax); if (!socketPath.exists()) { - sock->createListener(socketPath); + sock->createListener(0, socketPath.getFullPathName()); } } else { - while (!sock->createListener6(workerPort, m_host)) { + while (!sock->createListener(workerPort, m_host)) { if (++workerPort > workerPortMax) { break; } diff --git a/Server/Source/Worker.cpp b/Server/Source/Worker.cpp index 91dc242..dc99d16 100644 --- a/Server/Source/Worker.cpp +++ b/Server/Source/Worker.cpp @@ -98,7 +98,7 @@ void Worker::run() { if (nullptr != sock && sock->isConnected()) { m_audio->init(std::move(sock), m_cfg); RealtimeOptions opts; - opts.workDurationMs = (uint32)lround(m_cfg.samplesPerBlock / m_cfg.sampleRate * 1000) - 1; + opts = opts.withPeriodMs((double)lround(m_cfg.samplesPerBlock / m_cfg.sampleRate * 1000) - 1); m_audio->startRealtimeThread(opts); } else { logln("failed to establish audio connection"); @@ -275,7 +275,7 @@ void Worker::handleMessage(std::shared_ptr> msg) { jresult["supportsDoublePrecision"] = proc->supportsDoublePrecisionProcessing(); jresult["channelInstances"] = proc->getChannelInstances(); auto ts = proc->getTailLengthSeconds(); - if (ts == std::numeric_limits::infinity()) { + if (std::isinf(ts)) { ts = 0.0; } jresult["tailSeconds"] = ts;