Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f6a44a9
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
287f514
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
5d681f6
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
fb4fafd
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
c916c26
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
dcbf38e
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
ef2b94b
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
4f1f2f6
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
3f43673
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
d923c65
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
1693f1f
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
f0d704b
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
27f3971
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
10ef15f
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 17, 2025
366a8d6
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 19, 2025
fe9a6f8
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 19, 2025
cf1d5d0
Convert Jamulus Client to VST3 Plugin using JUCE
google-labs-jules[bot] Dec 19, 2025
592c12f
Fix VST compilation errors in client.cpp and clean up client.h
google-labs-jules[bot] Dec 19, 2025
4f310bf
Fix VST thread affinity for CClient to ensure network signal processing
google-labs-jules[bot] Dec 19, 2025
bdd7283
Fix VST thread affinity and ensure correct build target
google-labs-jules[bot] Dec 19, 2025
16d3603
Fix VST socket initialization and rebuild
google-labs-jules[bot] Dec 19, 2025
4b5f9a5
Fix VST server list updates with DirectConnection
google-labs-jules[bot] Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
cmake_minimum_required(VERSION 3.15)

project(JamulusVST VERSION 1.0.0 LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON) # Enable MOC for Q_OBJECT
set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Force -fPIC for all targets

# Definitions
add_compile_definitions(VST_PLUGIN)
add_compile_definitions(APP_VERSION="1.0.0")
add_compile_definitions(CUSTOM_MODES) # For Opus
add_compile_definitions(HEADLESS)
add_compile_definitions(JUCE_VST3_CAN_REPLACE_VST2=0)
add_compile_definitions(JUCE_WEB_BROWSER=0) # Disable WebKit dependency

# JUCE
include(FetchContent)
FetchContent_Declare(
juce
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
GIT_TAG master
)
FetchContent_MakeAvailable(juce)

# Qt
find_package(Qt5 COMPONENTS Core Network Concurrent Xml REQUIRED)

# Linux Dependencies (GTK/Curl for JUCE)
if(UNIX AND NOT APPLE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtk+-3.0)

# WebKit removed as we disabled JUCE_WEB_BROWSER

find_package(CURL REQUIRED)
endif()

# Opus
set(OPUS_CUSTOM_MODES ON CACHE BOOL "" FORCE)
add_subdirectory(libs/opus)

# Jamulus Sources
file(GLOB_RECURSE JAMULUS_SOURCES
"src/*.cpp"
"src/*.h"
"src/sound/vst/*.cpp"
"src/sound/vst/*.h"
"src/sound/soundbase.cpp"
"src/sound/soundbase.h"
)

# Filter Sources
# Note: GLOB_RECURSE returns absolute paths, so we use simpler regexes that match any part of the path
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "main\\.cpp$")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/asio/")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/jack/")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/coreaudio-mac/")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/coreaudio-ios/")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/oboe/")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "/sound/midi-win/")

# Exclude GUI files
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "dlg\\.cpp$")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "dlg\\.h$")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "analyzerconsole.*")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "audiomixerboard.*")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "levelmeter.*")
list(FILTER JAMULUS_SOURCES EXCLUDE REGEX "multicolorled.*")

# Plugin Sources
set(PLUGIN_SOURCES
src/PluginProcessor.cpp
src/PluginProcessor.h
src/PluginEditor.cpp
src/PluginEditor.h
)

# Create the plugin
juce_add_plugin(JamulusVST
COMPANY_NAME "Jamulus"
PLUGIN_MANUFACTURER_CODE "Jaml"
PLUGIN_CODE "Jaml"
FORMATS VST3
PRODUCT_NAME "JamulusVST"
IS_SYNTH FALSE
NEEDS_MIDI_INPUT TRUE
NEEDS_MIDI_OUTPUT FALSE
IS_MIDI_EFFECT FALSE
EDITOR_WANTS_KEYBOARD_FOCUS TRUE
)

target_sources(JamulusVST PRIVATE
${JAMULUS_SOURCES}
${PLUGIN_SOURCES}
)

# Include Directories
target_include_directories(JamulusVST PRIVATE
src
src/sound/vst
libs/opus/include
libs/opus/celt
libs/opus/src
)

if(UNIX AND NOT APPLE)
target_include_directories(JamulusVST PRIVATE ${GTK_INCLUDE_DIRS})
target_link_libraries(JamulusVST PRIVATE ${GTK_LIBRARIES} CURL::libcurl)
endif()

# Link Libraries
target_link_libraries(JamulusVST PRIVATE
Qt5::Core
Qt5::Network
Qt5::Concurrent
Qt5::Xml
opus
juce::juce_audio_utils
juce::juce_gui_basics
juce::juce_audio_processors
)
65 changes: 65 additions & 0 deletions src/JamulusBridge.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#pragma once

#include <QObject>
#include <QCoreApplication>
#include "client.h"
#include "global.h"
#include <juce_gui_basics/juce_gui_basics.h>
#include <functional>
#include <iostream>

class JamulusBridge : public QObject
{
Q_OBJECT

public:
JamulusBridge(CClient* client,
std::function<void(const CVector<CServerInfo>&)> onServerList,
std::function<void(const CVector<CChannelInfo>&)> onClientList,
std::function<void(const CVector<uint16_t>&)> onLevels)
: pClient(client),
serverListCb(onServerList),
clientListCb(onClientList),
levelsCb(onLevels)
{
if (pClient)
{
// Server List (Directory)
connect(pClient, &CClient::CLServerListReceived, this, &JamulusBridge::OnCLServerListReceived);

// Client List (Connected participants)
connect(pClient, &CClient::ConClientListMesReceived, this, &JamulusBridge::OnConClientListMesReceived);

// Levels
connect(pClient, &CClient::CLChannelLevelListReceived, this, &JamulusBridge::OnCLChannelLevelListReceived);

std::cout << "[JamulusBridge] Connected to CClient signals." << std::endl;
}
}

public slots:
void OnCLServerListReceived(CHostAddress InetAddr, CVector<CServerInfo> vecServerInfo)
{
std::cout << "[JamulusBridge] OnCLServerListReceived: " << vecServerInfo.Size() << " servers." << std::endl;
if (serverListCb) serverListCb(vecServerInfo);
}

void OnConClientListMesReceived(CVector<CChannelInfo> vecChanInfo)
{
std::cout << "[JamulusBridge] OnConClientListMesReceived: " << vecChanInfo.Size() << " clients." << std::endl;
if (clientListCb) clientListCb(vecChanInfo);
}

void OnCLChannelLevelListReceived(CHostAddress InetAddr, CVector<uint16_t> vecLevelList)
{
// Level updates are frequent, uncomment if needed
// std::cout << "[JamulusBridge] Levels received." << std::endl;
if (levelsCb) levelsCb(vecLevelList);
}

private:
CClient* pClient;
std::function<void(const CVector<CServerInfo>&)> serverListCb;
std::function<void(const CVector<CChannelInfo>&)> clientListCb;
std::function<void(const CVector<uint16_t>&)> levelsCb;
};
Loading