Repository navigation
audio-filters: Native VST3 plugin support - #13814
Closed
blockie710 wants to merge 2 commits into
Closed
blockie710 wants to merge 2 commits into
blockie710 wants to merge 2 commits into
Conversation
- Add obs-vst3 plugin with Steinberg VST3 SDK integration via CMake finder - Core host implementation: IHostApplication, IComponentHandler, IAudioProcessor - Cross-platform UI embedding: Windows HWND, macOS NSView, Linux X11 - Plugin scanning with moduleinfo.json caching and background thread - Sidechain support with audio resampling - State serialization via chunk/parameter fallback - Flatpak disabled (SDK path restrictions), Wayland preview only Files: - plugins/obs-vst3/ (16 source files) - cmake/finders/FindVST3SDK.cmake - plugins/CMakeLists.txt registration - CI/CD updates for VST3 SDK path on all platforms
…rm guards - Add virtual destructor to VST3ComponentHolder for safe polymorphic destruction - Verify RAII pattern in VST3Plugin::init() using SDK IPtr (no changes needed) - Add compile-time guards for Wayland backend (ENABLE_WAYLAND) - Apply clang-format to modified files
Member
|
Yikes. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VST3 Plugin - Code Review for PR #12752
Executive Summary
The implementation in PR #12752 by pkv adds a complete native VST3 host (
obs-vst3) alongside the existing VST2 plugin (obs-vst). The code is well-structured, follows OBS conventions, and passes build verification on Windows (MSVC). This review identifies areas for improvement and potential issues.Architecture Review
✅ Strengths
VST3EditorWindowwith platform-specific implementationsParameterChangeTransferwith Qt queued connections1. Memory Management - Raw Pointers in VST3EditorWindow
File:
VST3EditorWindow.cpp:132, 155Assessment: Qt parent ownership handles cleanup, but explicit
std::unique_ptrwould be clearer for non-Qt objects.2. Missing Virtual Destructors
File:
VST3ComponentHolder.h:54Assessment: Low risk - FUnknown provides virtual destructor chain, but explicit declaration recommended.
3. Exception Safety in Initialization
File:
VST3Plugin.cpp:247-277Fix: Use
std::unique_ptrwith custom deleter or ensure cleanup on failure.4. Thread Safety - GUI↔DSP Parameter Transfer
File:
VST3Plugin.cpp:380-427Assessment: The
uiDrainScheduledatomic flag prevents re-entrancy. Good design.5. Linux RunLoop Integration
File:
RunLoopImpl.cppQSocketNotifierfor FD eventsQTimerfor plugin timers6. Wayland Support Stub
File:
obs-vst3.cpp:118-124Assessment: Correctly disabled in practice (no Wayland VST3s exist), but should have compile-time guard.
Code Quality Issues
Style/Formatting (Fixed by clang-format)
RunLoopImpl.h- FIXEDStatic Analysis (cppcheck)
copyBuffers/sidechainCopyBuffers- FIXED with= {}uid.h:168- "Reference to temporary returned" in SDK (not our code)Functional Testing Gaps
1. Missing Automated Tests
No unit/integration tests for:
2. Edge Cases Not Tested
process()Licensing Compliance ✅
Build System Review
✅ CMake Integration
FindVST3SDK.cmakeproperly locates SDKSDK_WARN_FLAGSsuppresses SDK warnings.mmfilesReason: Flatpak sandbox restricts SDK paths to
/usrand$HOME. Correct decision.Performance Considerations
Audio Thread Safety
process()✅Potential Optimization
Recommendations
High Priority (Before Merge)
VST3ComponentHolderVST3Plugin::init()- use RAII forplugProviderMedium Priority (Follow-up PR)
test/cmocka/)Low Priority (Nice to Have)
Comparison with VST2 Plugin (
obs-vst)setParameter/getParameterIEditController+IParameterChangesIAudioProcessor::getLatencySamples()moduleinfo.jsoncacheVerdict
Status: Ready for Review with minor fixes
The implementation is production-quality and follows OBS conventions. The three high-priority items are straightforward fixes. The VST3 plugin provides significant user value (sidechain, modern plugin support, better parameter handling) and correctly coexists with the legacy VST2 plugin.
Suggested Commit for Fixes
Testing Sign-off
Run full test matrix before final approval