v0.2.200
What's New
Fix: perry setup now saves to project perry.toml
All 3 platform setup wizards (iOS, Android, macOS) previously skipped writing project-specific config when perry.toml didn't exist — they just printed manual instructions. Now the file is auto-created with the correct [ios], [android], or [macos] section.
Audio Capture API (perry/system)
Real-time microphone capture with A-weighted dB(A) metering on all 6 platforms:
import { audioStart, audioGetLevel, audioGetPeak, audioGetWaveformSamples } from "perry/system";
audioStart();
setInterval(() => console.log(audioGetLevel(), "dB"), 100);audioStart()/audioStop()— start/stop captureaudioGetLevel()— smoothed dB(A) readingaudioGetPeak()— peak amplitude (0.0–1.0)audioGetWaveformSamples(count)— recent samples for visualizationgetDeviceModel()— device model identifier
| Platform | Backend |
|---|---|
| macOS | AVAudioEngine |
| iOS | AVAudioSession + AVAudioEngine |
| Android | AudioRecord (JNI) |
| Linux | PulseAudio |
| Windows | WASAPI |
| Web | getUserMedia + AnalyserNode |
Camera API (perry/ui, iOS)
Live camera preview with color sampling:
import { CameraView, cameraStart, cameraSampleColor, cameraSetOnTap } from "perry/ui";
const cam = CameraView();
cameraStart(cam);
cameraSetOnTap(cam, (x, y) => {
const rgb = cameraSampleColor(x, y);
});CameraView()— AVCaptureSession-based live preview widgetcameraStart/cameraStop/cameraFreeze/cameraUnfreezecameraSampleColor(x, y)— pixel-level color sampling (5x5 averaged)cameraSetOnTap(handle, callback)— tap-to-sample with normalized coordinates
Documentation
- New pages: Audio Capture, Camera
- Updated system overview, UI overview, and widgets reference