You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add VFS audio resource loading and upgrade to Elementary v4
- Add loadAudioResource/unloadAudioResource APIs for loading audio files
- Use miniaudio for cross-platform audio decoding (WAV, MP3, FLAC, etc.)
- Upgrade Elementary submodule and @elemaudio/core to v4.0.3
- Update JS Renderer for Elementary v4 API (sendMessage-only constructor)
- Fix audio buffer zeroing to prevent noise when no graph is active
- Add AudioBufferResource for proper multi-channel sample support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file provides guidance to AI coding agents when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
**react-native-elementary** is a React Native library that bridges Elementary Audio with React Native, enabling audio synthesis and processing. It uses C++ audio processing (via miniAudio and Elementary Runtime) with platform-specific wrappers for iOS (Objective-C++/AVAudioEngine) and Android (Kotlin/JNI).
8
+
9
+
## Common Commands
10
+
11
+
```bash
12
+
# Install dependencies
13
+
yarn
14
+
15
+
# Start Metro bundler for example app
16
+
yarn example start
17
+
18
+
# Run example app
19
+
yarn example ios
20
+
yarn example android
21
+
22
+
# Type checking
23
+
yarn typecheck
24
+
25
+
# Linting (uses ESLint + Prettier)
26
+
yarn lint
27
+
yarn lint --fix
28
+
29
+
# Run tests
30
+
yarn test
31
+
32
+
# Build library
33
+
yarn prepack
34
+
35
+
# Setup project (install deps + pods)
36
+
yarn bootstrap
37
+
```
38
+
39
+
## Architecture
40
+
41
+
### Code Flow
42
+
```
43
+
JavaScript (useRenderer hook)
44
+
↓
45
+
NativeElementary.ts (TurboModule spec)
46
+
↓
47
+
┌─────────────────────────────────────┐
48
+
│ iOS: Elementary.mm (Obj-C++) │
49
+
│ Android: ElementaryModule.kt │
50
+
└─────────────────────────────────────┘
51
+
↓
52
+
C++ Layer (cpp/audioengine.cpp)
53
+
↓
54
+
Elementary Runtime + miniAudio
55
+
```
56
+
57
+
### Key Source Files
58
+
-`src/index.tsx` - Public API: `getSampleRate()`, `NativeRenderer`, `useRenderer()`
0 commit comments