Share the native audio runtime across effects - #939
Closed
tontontimiro wants to merge 1 commit into
Closed
tontontimiro wants to merge 1 commit into
tontontimiro wants to merge 1 commit into
Conversation
tontontimiro
force-pushed
the
refactor/share-audio-runtime
branch
from
September 21, 2026 06:09
505780f to
6732701
Compare
VictorTaelin
pushed a commit
that referenced
this pull request
Sep 21, 2026
audio.c holds the ring and the platform backends once; each effect's body and registration is guarded by its CID, so a program that imports one effect never needs the other two. (PR #939)
Contributor
|
Merged into 2.0.25 under your authorship, thank you: one Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself. |
4 tasks
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.
Why the change
Replace three copies of the native audio runtime with one shared implementation so fixes cannot drift between audio effects.
Special things to note
clusteris unavailable here. No compiler, kernel, Lean, JS, gate limits or pins changed.Change outline
The native sources shrink from 545 to 220 lines; including 42 lines of regression tests, the full PR removes 283 lines and 2,908 ttok (78 added, 361 removed).
Base.Audio.{open, write, close} - audio_open.c -> ring + platform backends + open - audio_write.c -> ring + platform backends + write - audio_close.c -> ring + platform backends + close + audio.c -> existing eff_src realpath deduplication -> one shared runtime + CID_AUDIO_OPEN defined -> unchanged open body + registration + CID_AUDIO_WRITE defined -> unchanged write body + registration + CID_AUDIO_CLOSE defined -> unchanged close body + registrationThe guards cover whole effect entries, so a program using only one effect never needs IDs for the other two; the three new standalone-effect tests cover that boundary. The shared ring/platform code and all effect bodies match the originals byte-for-byte.