Skip to content

add CAPI plugin export - #10

Merged
erikgrahn13 merged 1 commit into
mainfrom
codex/add-capi-export
Jul 20, 2026
Merged

add CAPI plugin export#10
erikgrahn13 merged 1 commit into
mainfrom
codex/add-capi-export

Conversation

@erikgrahn13

Copy link
Copy Markdown
Owner

Summary

  • add a headless Qualcomm AudioReach CAPI adapter that reuses the existing Singularity plugin classes
  • generate CAPI entry points from the CMake target name and expose parameters declared by getParameters()
  • queue parameter changes across the CAPI control and realtime processing paths
  • support effect input media formats, instrument output media formats, large-block chunking, algorithmic reset, and output parameters
  • build ExampleEffect_CAPI and ExampleInstrument_CAPI through FORMATS CAPI
  • keep CAPI builds free of Skia, QuickJS, platform-window, and UI dependencies
  • move CAPI, VST3, and APP target construction into format-specific CMake helpers in their respective directories
  • move the CAPI adapter tests under capi/tests

Why

Singularity plugins currently export APP and VST3 targets but cannot be packaged as headless AudioReach CAPI modules. This introduces the adapter and build integration without creating separate DSP examples or duplicating parameter metadata.

The CMake refactor keeps format-specific SDK and target setup beside each format implementation while retaining shared desktop/UI initialization in SingularityPlugin.cmake.

Validation

  • fresh Debug CAPI configure with public AudioReach headers and warnings treated as errors
  • built ExampleEffect_CAPI, ExampleInstrument_CAPI, and SingularityCapiTests
  • CAPI adapter tests: 1/1 passed
  • verified both generated libraries export their target-derived *_get_static_properties and *_init symbols
  • built both ExampleEffect and ExampleInstrument APP targets on macOS
  • both VST3 bundles passed all 47 Steinberg validator tests
  • verified an APP-only consumer does not initialize the VST3 SDK
  • verified CAPI configuration from an external consumer source tree

Remaining platform validation

The CAPI code was host-built on macOS against the public AudioReach headers. A real Hexagon toolchain build, AudioReach module registration, and H2XML/AMDB integration remain target-platform integration steps. Linux and Windows desktop coverage is left to CI.

@erikgrahn13
erikgrahn13 marked this pull request as ready for review July 20, 2026 12:22
@erikgrahn13
erikgrahn13 merged commit 1ff849e into main Jul 20, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edf7cfef16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread capi/SingularityCapi.h
Comment on lines +342 to +344
if constexpr (!PluginType::isInstrument)
inputStream->buf_ptr[channel].actual_data_len = bytes;
out.buf_ptr[channel].actual_data_len = bytes;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate input stream timing flags to effect outputs

When an effect receives an input stream with a valid timestamp or stream flags such as erasure/EOF, process() only updates the output buffers' lengths and never copies inputStream->timestamp or inputStream->flags into out. Because the output stream is a separate CAPI object, downstream modules consequently receive default or stale timing state even though this non-buffering effect consumes and produces the same frame; propagate the corresponding input stream fields for effects.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant