What problem does it solve?
Bridges the gap between native C++ audio node state and JavaScript by providing a robust JSI HostObject layer. It explains naming conventions, property/method exposure via macros, shadow state management for JS↔audio-thread communication, and safe cross-thread argument parsing and return value patterns.
Use this skill when creating a new audio node HostObject, modifying existing HostObject getters/setters/calls, wiring a new node into the context factory, or debugging JSI-related crashes and type errors.
Core Features & Use Cases
- Defines a three-layer architecture where TS, HostObject, and AudioNode interact without serialization.
- Documents guarding against common pitfalls like shadow state initialization and safe destructor cleanup.
- Provides guidance on macros, registration in constructors, and memory pressure considerations for large buffers.
- Use Case: Add a new HostObject for a custom audio node by following the provided structure and examples.
Quick Start
Create or modify a HostObject following the patterns described above and ensure you register getters/setters in the constructor.