Skip to content

Commit 115c875

Browse files
committed
0.31.0
1 parent f05f558 commit 115c875

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2833
-2649
lines changed

CMakeLists.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/bootstrap.cmake")
55

66
project(${_name} VERSION ${_version})
77

8-
# Set default build type to Debug
8+
# Set default build type to RelWithDebInfo for local development
9+
# RelWithDebInfo provides optimized code with debug symbols (PDB files on Windows)
910
if(NOT CMAKE_BUILD_TYPE)
10-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
11+
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build (Debug, Release, or RelWithDebInfo)" FORCE)
1112
endif()
1213
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
1314

1415
option(ENABLE_FRONTEND_API "Use obs-frontend-api for UI functionality" ON)
15-
option(BUILD_TESTS "Build unit tests" OFF)
1616

1717
include(compilerconfig)
1818
include(defaults)
@@ -102,7 +102,6 @@ set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES CXX_STANDARD 23)
102102

103103
add_subdirectory(lib/atkaudio)
104104

105-
106105
string(JSON PLUGIN_DISPLAY_NAME GET ${buildspec} displayName)
107106
string(JSON PLUGIN_AUTHOR GET ${buildspec} author)
108107
string(JSON PLUGIN_OBS_VERSION_REQUIRED GET ${buildspec} dependencies obs-studio version)
@@ -113,23 +112,22 @@ configure_file(src/config.h.in config.h @ONLY)
113112

114113
include(./lib/atkaudio/cmake/cpack.cmake)
115114

116-
# Enable testing and add tests subdirectory
117-
if(BUILD_TESTS)
118-
enable_testing()
119-
add_subdirectory(tests)
120-
message(STATUS "Building tests: Enabled")
121-
endif()
115+
116+
# Build tests
117+
include(CTest)
118+
add_subdirectory(tests)
122119

123120
# Automatically run install after build (skip in CI or when installing to system directories without permissions)
124-
if(NOT DEFINED ENV{CI} OR NOT CMAKE_INSTALL_PREFIX MATCHES "^/usr")
121+
if(NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS} AND NOT CMAKE_INSTALL_PREFIX MATCHES "^/usr")
125122
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
126123
COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --config $<CONFIG> --component plugin
127124
COMMENT "Installing plugin after build..."
128125
)
129126
endif()
130127

131128
# On non-CI Linux builds, copy plugin to user home directory after build
132-
if(NOT DEFINED ENV{CI} AND UNIX AND NOT APPLE)
129+
if(NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS} AND UNIX AND NOT APPLE)
130+
message(STATUS "Configuring post-build copy to ~/.config/obs-studio/plugins/")
133131
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
134132
set(_user_arch "64bit")
135133
else()

CMakePresets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"lhs": "${hostSystemName}",
8888
"rhs": "Windows"
8989
},
90-
"generator": "Visual Studio 17 2022",
90+
"generator": "Visual Studio 18 2026",
9191
"architecture": "x64",
9292
"warnings": {
9393
"dev": true,
@@ -121,7 +121,7 @@
121121
"lhs": "${hostSystemName}",
122122
"rhs": "Windows"
123123
},
124-
"generator": "Visual Studio 17 2022",
124+
"generator": "Visual Studio 18 2026",
125125
"architecture": "ARM64",
126126
"warnings": {
127127
"dev": true,

README.md

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# atkAudio Plugin for OBS
22

3-
## Plugin Host
3+
## PluginHost
44

55
- VST3 plugin host for OBS
6-
- Up to 8 channels
6+
- MIDI, e.g. for using MIDI keyboard and a sampler plugin as soundboard
77
- Sidechain support
8+
- Optional multithreading for improved performance with multi-core CPUs
9+
- Direct interfacing with audio and MIDI hardware devices
810
- AU plugins on Apple macOS
911
- LADSPA and LV2 plugins on Linux
1012

11-
## Plugin Host2
13+
## PluginHost2
1214

13-
- Includes all features of regular Plugin Host plus:
14-
- MIDI, e.g. for using MIDI keyboard and a sampler plugin as soundboard
15-
- Direct interfacing with audio and MIDI hardware devices
15+
- Includes all features of regular PluginHost plus:
1616
- Use multiple plugins to create complex audio processing chains and graphs from OBS sources and audio devices
17-
- Multicore parallel audio processing for improved performance
17+
- Always internally multithreading (no extra latency penalty)
1818
- Saving and loading of graphs as files
19-
- Route audio and MIDI between plugins and hardware (ASIO/CoreAudio included)
19+
- Route audio and MIDI between sources, plugins and hardware (ASIO/CoreAudio included)
2020
- Sample rate converting and drift compensating internal buffering for seamless audio between OBS sources and audio devices
2121
- etc
2222

23-
Plugin Host2 can interface directly with audio and MIDI hardware, OBS audio sources, and output audio as new OBS sources, allowing for complex audio processing setups. E.g. use ASIO interface as audio device, take additional audio from OBS sources, route monitoring to ASIO outputs and/or different audio drivers/hardware, use plugins and create final mix, and output the processed audio as a new OBS source for recording and streaming. Or just create a simple soundboard with a sampler plugin and a MIDI keyboard.
23+
PluginHost2 can interface directly with audio and MIDI hardware, OBS audio sources, and output audio as new OBS sources, allowing for complex audio processing setups. E.g. use ASIO interface as audio device, take additional audio from OBS sources, route monitoring to ASIO outputs and/or different audio drivers/hardware, use plugins and create final mix, and output the processed audio as a new OBS source for recording and streaming. Or just create a simple soundboard with a sampler plugin and a MIDI keyboard.
24+
25+
Develop your own audio processing plugins and integrate them into `PluginHost2` using the [JUCE framework](https://juce.com/) AudioProcessor class. See `InternalPlugins.cpp` how `GainPlugin` is loaded. See `GainPlugin.h` for implementation. Optionally include OBS headers to use the [OBS API](https://docs.obsproject.com/) for more advanced integration with [OBS Studio](https://obsproject.com/)
2426

25-
## Device I/O
27+
## DeviceIo(2)
2628

2729
- Send and receive audio directly into and from audio devices
2830
- "Anything from/to anywhere" device routing
2931
- ASIO, CoreAudio and Windows Audio devices
3032

31-
Develop your own audio processing plugins and integrate them into `Plugin Host2` using the [JUCE framework](https://juce.com/) AudioProcessor class. See `InternalPlugins.cpp` how `GainPlugin` is loaded. See `GainPlugin.h` for implementation. Optionally include OBS headers to use the [OBS API](https://docs.obsproject.com/) for more advanced integration with [OBS Studio](https://obsproject.com/)
32-
3333
## Audio Source Mixer (OBS Source)
3434

3535
- Mix audio from up to 8 OBS sources into a new OBS audio source
@@ -38,7 +38,7 @@ Develop your own audio processing plugins and integrate them into `Plugin Host2`
3838

3939
## Build instructions
4040

41-
Project is based on [OBS Plugin Template](https://github.com/obsproject/obs-plugintemplate) and depends on [JUCE Framework](https://github.com/juce-framework/JUCE). Install JUCE Framework [Minimum System Requirements](https://github.com/juce-framework/JUCE#minimum-system-requirements) and OBS Plugin Template [Supported Build Environment](https://github.com/obsproject/obs-plugintemplate#supported-build-environments) and follow OBS Plugin Template [Quick Start Guide](https://github.com/obsproject/obs-plugintemplate/wiki/Quick-Start-Guide).
41+
Project is (now loosely) based on [OBS Plugin Template](https://github.com/obsproject/obs-plugintemplate) and depends on [JUCE Framework](https://github.com/juce-framework/JUCE). Install JUCE Framework [Minimum System Requirements](https://github.com/juce-framework/JUCE#minimum-system-requirements) and OBS Plugin Template [Supported Build Environment](https://github.com/obsproject/obs-plugintemplate#supported-build-environments) and follow OBS Plugin Template [Quick Start Guide](https://github.com/obsproject/obs-plugintemplate/wiki/Quick-Start-Guide).
4242

4343
In short, after installing all dependencies (Ubuntu example):
4444

@@ -52,10 +52,6 @@ cmake --build --preset ubuntu-x86_64
5252
Find `atkaudio-pluginforobs.so` and copy it to OBS plugins directory.
5353
See `CMakePresets.json` for Windows, macOS and other build presets.
5454

55-
### Linux Realtime Thread Support
56-
57-
For optimal performance on Linux, see [LINUX_REALTIME.md](LINUX_REALTIME.md) for information about enabling realtime thread scheduling. The plugin works without this configuration but may have better performance with it enabled.
58-
5955
## Donation
6056

6157
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=ERBKC76F55HZW)
@@ -64,11 +60,5 @@ If you find this project useful, please consider making [a donation](https://www
6460

6561
## Installation
6662

67-
- Download and install [latest release](https://github.com/atkAudio/PluginForObsRelease/releases/latest)
68-
- Manual/portable installations e.g. on major Linux distros: extract `portable-Linux.zip` file and copy the directory `atkaudio-pluginforobs` into `~/.config/obs-studio/plugins/`.
69-
70-
## Development
71-
72-
For developers working on this project:
73-
74-
- **Release Process**: Releases are automatically created when tags matching `x.y.z` or `x.y.z-beta.n` format are pushed
63+
- Download and install [latest release](https://github.com/atkAudio/PluginForObsRelease/releases/latest) using the appropriate installer for your OS.
64+
- Manual/portable installations e.g. on major Linux distros: extract portable `.zip` file and copy the directory `atkaudio-pluginforobs` into `~/.config/obs-studio/plugins/`.

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"uuids": {
4848
"windowsApp": "ad885c58-5ca9-44de-8f4f-1c12676626a9"
4949
},
50-
"version": "0.30.1",
50+
"version": "0.31.0",
5151
"website": "https://www.atkaudio.com"
5252
}

cmake/linux/compilerconfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ else()
7070
set(ENABLE_COMPILER_TRACE OFF CACHE STRING "Enable Clang time-trace (required Clang and Ninja)" FORCE)
7171
endif()
7272

73-
add_compile_definitions($<$<CONFIG:DEBUG>:DEBUG> $<$<CONFIG:DEBUG>:_DEBUG> SIMDE_ENABLE_OPENMP)
73+
add_compile_definitions($<$<CONFIG:DEBUG>:DEBUG> $<$<CONFIG:DEBUG>:_DEBUG>)

cmake/linux/defaults.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ if(CMAKE_INSTALL_LIBDIR MATCHES "(CMAKE_SYSTEM_PROCESSOR)")
99
string(REPLACE "CMAKE_SYSTEM_PROCESSOR" "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
1010
endif()
1111

12+
# Set default install prefix to /usr for Linux (where OBS looks for plugins)
13+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
14+
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Default install prefix" FORCE)
15+
endif()
16+
1217
# Enable find_package targets to become globally available targets
1318
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
1419

cmake/linux/helpers.cmake.backup

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# CMake Linux helper functions module
2+
3+
include_guard(GLOBAL)
4+
5+
include(helpers_common)
6+
7+
# set_target_properties_plugin: Set target properties for use in obs-studio
8+
function(set_target_properties_plugin target)
9+
set(options "")
10+
set(oneValueArgs "")
11+
set(multiValueArgs PROPERTIES)
12+
cmake_parse_arguments(PARSE_ARGV 0 _STPO "${options}" "${oneValueArgs}" "${multiValueArgs}")
13+
14+
message(DEBUG "Setting additional properties for target ${target}...")
15+
16+
while(_STPO_PROPERTIES)
17+
list(POP_FRONT _STPO_PROPERTIES key value)
18+
set_property(TARGET ${target} PROPERTY ${key} "${value}")
19+
endwhile()
20+
21+
set_target_properties(
22+
${target}
23+
PROPERTIES VERSION ${PLUGIN_VERSION} SOVERSION ${PLUGIN_VERSION_MAJOR} PREFIX ""
24+
)
25+
26+
message(STATUS "Installing target ${target} to:")
27+
message(STATUS " - LIBRARY: ${CMAKE_INSTALL_LIBDIR}/obs-plugins")
28+
message(STATUS " - RUNTIME: ${CMAKE_INSTALL_BINDIR}")
29+
30+
install(
31+
TARGETS ${target}
32+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
33+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/obs-plugins
34+
)
35+
36+
# Additional install for portable component with custom directory structure
37+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
38+
set(_portable_arch "64bit")
39+
else()
40+
set(_portable_arch "32bit")
41+
endif()
42+
43+
install(
44+
TARGETS ${target}
45+
RUNTIME DESTINATION obs-plugins/${_portable_arch}
46+
LIBRARY DESTINATION obs-plugins/${_portable_arch}
47+
)
48+
49+
if(TARGET plugin-support)
50+
target_link_libraries(${target} PRIVATE plugin-support)
51+
endif()
52+
53+
add_custom_command(
54+
TARGET ${target}
55+
POST_BUILD
56+
COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>"
57+
COMMAND
58+
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>" "${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>"
59+
COMMENT "Copy ${target} to rundir"
60+
VERBATIM
61+
)
62+
63+
target_install_resources(${target})
64+
65+
get_target_property(target_sources ${target} SOURCES)
66+
set(target_ui_files ${target_sources})
67+
list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
68+
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
69+
endfunction()
70+
71+
# Helper function to add resources into bundle
72+
function(target_install_resources target)
73+
message(DEBUG "Installing resources for target ${target}...")
74+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
75+
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
76+
foreach(data_file IN LISTS data_files)
77+
cmake_path(
78+
RELATIVE_PATH
79+
data_file
80+
BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
81+
OUTPUT_VARIABLE relative_path
82+
)
83+
cmake_path(GET relative_path PARENT_PATH relative_path)
84+
target_sources(${target} PRIVATE "${data_file}")
85+
source_group("Resources/${relative_path}" FILES "${data_file}")
86+
endforeach()
87+
88+
message(STATUS "Installing data directory for ${target} to:")
89+
message(STATUS " - DESTINATION: ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target}")
90+
91+
install(
92+
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
93+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target}
94+
USE_SOURCE_PERMISSIONS
95+
)
96+
97+
add_custom_command(
98+
TARGET ${target}
99+
POST_BUILD
100+
COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>/${target}"
101+
COMMAND
102+
"${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
103+
"${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>/${target}"
104+
COMMENT "Copy ${target} resources to rundir"
105+
VERBATIM
106+
)
107+
endif()
108+
endfunction()
109+
110+
# Helper function to add a specific resource to a bundle
111+
function(target_add_resource target resource)
112+
message(DEBUG "Add resource '${resource}' to target ${target} at destination '${target_destination}'...")
113+
114+
install(FILES "${resource}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target})
115+
116+
add_custom_command(
117+
TARGET ${target}
118+
POST_BUILD
119+
COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>/${target}"
120+
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}" "${CMAKE_CURRENT_BINARY_DIR}/rundir/$<CONFIG>/${target}"
121+
COMMENT "Copy ${target} resource ${resource} to rundir"
122+
VERBATIM
123+
)
124+
125+
source_group("Resources" FILES "${resource}")
126+
endfunction()

cmake/macos/compilerconfig.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ include(compiler_common)
1313

1414
add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fopenmp-simd>")
1515

16+
# Enable dSYM generator for release builds
17+
string(APPEND CMAKE_C_FLAGS_RELEASE " -g")
18+
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -g")
19+
string(APPEND CMAKE_OBJC_FLAGS_RELEASE " -g")
20+
string(APPEND CMAKE_OBJCXX_FLAGS_RELEASE " -g")
21+
22+
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -g")
23+
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -g")
24+
string(APPEND CMAKE_OBJC_FLAGS_RELWITHDEBINFO " -g")
25+
string(APPEND CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO " -g")
26+
1627
# Default ObjC compiler options used by Xcode:
1728
#
1829
# * -Wno-implicit-atomic-properties

cmake/macos/helpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function(set_target_properties_plugin target)
6464
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
6565

6666
install(TARGETS ${target} LIBRARY DESTINATION .)
67-
install(FILES "$<TARGET_BUNDLE_DIR:${target}>.dsym" CONFIGURATIONS Release DESTINATION . OPTIONAL)
67+
install(FILES "$<TARGET_BUNDLE_DIR:${target}>.dsym" CONFIGURATIONS Release DESTINATION .)
6868

6969
# Additional install for portable component with custom directory structure
7070
if(CMAKE_SIZEOF_VOID_P EQUAL 8)

cmake/macos/xcode.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ set(CMAKE_XCODE_ATTRIBUTE_SWIFT_VERSION 5.0)
5858
# output configuration. Report to KitWare.
5959
#
6060
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] dwarf)
61-
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=RelWithDebInfo] dwarf)
61+
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=RelWithDebInfo] dwarf-with-dsym)
6262
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Release] dwarf-with-dsym)
6363
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=MinSizeRel] dwarf-with-dsym)
6464

0 commit comments

Comments
 (0)