feat: Audio Unit plugin support for per-app and per-device effects#305
Open
iscle wants to merge 1 commit into
Open
feat: Audio Unit plugin support for per-app and per-device effects#305iscle wants to merge 1 commit into
iscle wants to merge 1 commit into
Conversation
9f9b282 to
670c1aa
Compare
Enable third-party and system AU effect plugins to be loaded and applied to individual applications or output devices, similar to SoundSource. Audio pipeline: - Non-interleaved stereo rendering with pre-allocated deinterleave buffers - RT-safe AU hosting via AudioUnitRender with monotonic sample time tracking - Immutable AUEffectChain with atomic swap + deferred destruction (500ms) - Signal flow: EQ → AutoEQ → [Per-App AU] → [Per-Device AU] → Loudness → Limiter - Tail time tracking for reverb/delay effects (continues rendering after silence) - Crossfade support with independent AU instances per tap - Device AU chains reload correctly on device switch Plugin management: - AUPluginScanner discovers kAudioUnitType_Effect and kAudioUnitType_MusicEffect - Live detection via kAudioComponentRegistrationsChangedNotification - Factory preset enumeration and selection per effect - AU parameter state persisted on window close and app quit (ClassInfo plist) - Crash guard integration: FNV-1a hash tracking, crash file write via POSIX, auto-disable offending plugins on next launch - Full persistence: per-app chains, per-device chains, bypass state, favorites, crash history UI: - Hierarchical plugin picker with search, favorites (with namespaced ForEach IDs), and crash warnings - Effect chain view with enable/disable, bypass, factory presets, remove - Failed plugin instantiation shown with warning icon - AUGenericView floating windows for parameter editing - Device FX button with ExpandableGlassRow integration Architecture: - AUChainState model consolidates entries, bypass, and failedEntryIDs - AudioEngine owns observable AU state (appAU/deviceAU dictionaries); SettingsManager handles persistence only - Favorites and crash history use @Observable-tracked closures for views, with @State in popover content (NSPanel observation boundary) Includes 45 unit tests covering descriptor codable, scanner discovery, AU instantiation, RT rendering (lowpass attenuation, reverb tail), bypass passthrough, settings persistence, and crash history. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
670c1aa to
7db9469
Compare
|
Is it possible to add the option to add the FX onto any app instead like in SoundSource instead of assigning it to a sound device? Thank you. |
|
Please consider including this in the next release. |
|
+1 on that, still waiting on this feature a month later |
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.
Summary
This PR implements support for Apple's Audio Unit plugins. They can be toggled per-device and per-app basis. Changes persist across reboots, and custom UIs can be opened. The functionality overall is really similar to other competitor paid audio software for macOS ;)
Screenshots
Features
/Library/Audio/Plug-Ins/Componentsand~/Library/Audio/Plug-Ins/Componentswith live detection of newly installed plugins viakAudioComponentRegistrationsChangedNotificationkAudioUnitProperty_CocoaUIwith IMP-based invocation; falls back toAUGenericViewwhen unavailableAUChainStatemodel consolidates entries, bypass, and failedEntryIDs per scopeappAU/deviceAUdictionaries); SettingsManager handles persistence only@Statewith namespaced IDs (NSPanel observation boundary prevents@Observabletracking)Signal flow
Test plan
🤖 Generated with Claude Code