One-click install
npx skills add https://github.com/software-mansion/react-native-audio-api --skill audio-nodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audio-nodes
Source: https://github.com/software-mansion/react-native-audio-api/tree/main/.claude/skills/audio-nodes
Command: npx skills add https://github.com/software-mansion/react-native-audio-api --skill audio-nodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

C++ audio node engine for react-native-audio-api. Covers the AudioNode class hierarchy, the processNode() audio-thread contract (no allocs, no locks, no blocking I/O), AudioParam a-rate/k-rate processing, cross-thread communication patterns (CrossThreadEventScheduler, IAudioEventHandlerRegistry), and a step-by-step checklist for implementing a new node end-to-end. Use this skill when implementing a new Web Audio API node, modifying audio graph traversal or processing logic, or debugging audio rendering artifacts. Trigger phrases: "add a new node", "implement AudioNode", "processNode", "audio thread", "AudioParam automation".

Core Features & Use Cases

  • AudioNode hierarchy guidance including GainNode, OscillatorNode, and more, with a reference implementation pattern.
  • Detailed processNode lifecycle on the audio thread with preallocation and thread-safety rules.
  • Cross-thread communication patterns (CrossThreadEventScheduler, IAudioEventHandlerRegistry) and event firing to JS.

Quick Start

Instantiate a new AudioNode subclass following the GainNode reference pattern to implement a new Web Audio API node.

Frequently Asked Questions about audio-nodes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a new Web Audio API node in React Native?

To implement a new Web Audio API node in React Native, instantiate a new AudioNode subclass following the GainNode reference pattern. This structured blueprint covers the node hierarchy, processNode lifecycle, and cross-thread communication end-to-end.

What are the strict rules for audio thread processing in React Native?

Audio thread processing in React Native requires strict rules: no allocations, no locks, and no blocking I/O. The processNode() contract enforces these constraints to ensure real-time audio rendering performance and prevent thread-safety violations.

How does AudioParam a-rate and k-rate processing work in React Native audio?

AudioParam a-rate and k-rate processing in React Native audio nodes handle parameter automation at different granularities. The blueprint guides AudioParam handling within the processNode() lifecycle to ensure correct audio graph traversal and rendering.

Why am I getting audio rendering artifacts in my React Native audio graph?

Audio rendering artifacts in React Native often stem from violating the audio thread contract. Debugging requires checking for allocations, locks, or blocking I/O within processNode(), and ensuring proper preallocation in the node's constructor.

How do I handle cross-thread communication for React Native audio events?

Cross-thread communication for React Native audio events uses CrossThreadEventScheduler and IAudioEventHandlerRegistry. These patterns manage event firing to JavaScript, ensuring safe data transfer between the audio rendering thread and the main thread.

Do I need to preallocate memory when building React Native audio nodes?

Yes, you must preallocate memory in the constructor when building React Native audio nodes. This preallocation is required because the processNode() audio thread contract strictly forbids dynamic allocations during real-time audio processing.