In Part 10 of the Rust on Android series I wrote that if I started Klarinet’s engine today, the DSP core would be Rust. Klarinet 0.6.0, published 7 November 2026, is that core.
The published Kotlin API stays. Queues, the effect chain, the sixteen effects, and the callback offload now live in the shared Rust DSP. The audio callback still does not allocate, lock, or enter Kotlin. Vendored Oboe and miniaudio stay wrapped.
The Klarinet introduction still describes 0.0.1, when that core was C++.
Install
implementation("com.vectencia.klarinet:klarinet:0.6.0")
implementation("com.vectencia.klarinet:klarinet-coroutines:0.6.0")
The Android variant of klarinet already depends on com.vectencia.klarinet:klarinet-jni:0.6.0. The Klarinet case study still shows the 0.0.1 coordinates.
Where that core is linked
JVM, Android (arm64-v8a, armeabi-v7a, x86_64), linuxX64, and every Gradle Apple DSP archive link it.
On the iOS, tvOS, and watchOS demos, the sine callbacks fill through klarinet_render_sine.
Analysis, WAV, and the browser
Fft, AudioAnalyzer, AudioMath, and LinearResampler run in Rust on JVM, Android, JS, and Apple. Native desktop keeps the Kotlin body for those four.
JS and JVM encode and decode WAV through one Rust codec. Native desktop keeps miniaudio. Android keeps MediaCodec. Apple keeps ExtAudioFile. Compressed decode on JS stays decodeAudioData.
On JS, Gain runs in the wasm worklet and uses AudioMath.dbToLinear. The other effect types stay Web Audio nodes. SampleRing stays the main-thread queue. A change to FADE_MS or enable does not restart a gain ramp already in progress.
Android routes
The Android native backend uses Google Oboe 1.11.0. Data, error, and routing callbacks are shared_ptrs, registered with setDataCallback, setErrorCallback, and setRoutingCallback.
observeRouteChanges and routeChangeFlow emit reason = "RoutingChanged" when Oboe reports a routing change on API 37 and newer. previousRoute is the previous device id list, or unspecified. On older Android versions the stream still disconnects, and these calls do not emit.
Demos
The Compose, web, and SwiftUI demos picked up requestRecordPermission, routeChangeFlow / clearRouteChanges, AnalyzingCallback, asFlow, band-pass bandwidth in octaves, and underrun counts. They also have a studio visual system with animated screen transitions.
:sample has a perm listen path for hasRecordPermission and requestRecordPermission.
Spirit Box
Spirit Box is a Compose Multiplatform app in demos/spirit-box. It depends on klarinet:0.6.0 and klarinet-coroutines:0.6.0. Android, iOS, and the JVM desktop share the session code. It landed on main on 8 November 2026. The v0.6.0 tag does not include it.
It hops twelve bundled clips, six FM and six AM, mixed with noise, so short bits of speech come through the static. Dwell is 50 to 350 ms. The sweep runs forward, reverse, or held. One band-pass sits at 1 kHz, 1 octave on FM and 2.5 on AM. The band switch calls setParameter on BPFParams.BANDWIDTH while the output stream is running, then a gain stage. A second AudioEngine opens the microphone and the session mixes it in. AudioFileWriter stores the dry mix and the station clip on the session coroutine. The audio callback only copies into a ring. There is no tap after the effect chain, so the WAV is the mix from before the band-pass and the live output is the stream after it.
Review loads the take with AudioFileReader and plays it on another low-latency output stream, with rate, reverse, and gain on that stream. The scan stays in the voice band, 300 Hz to 3400 Hz, and marks a span of 80 ms to 2 s when it clears the noise floor and the station clip does not account for it.
The hop clock, the noise mix, and the review cursor stay in Kotlin. The band-pass and the gain run in the Rust DSP on the audio thread. That callback still does not allocate, lock, or enter Kotlin.
Publishing and the docs
Maven publish builds :klarinet:jsSourcesJar after generateKlarinetWasm, so the generated wasm source lands in the jar. GitHub Pages is assembled by scripts/assemble-pages.sh, which the workflow and make pages both call.
The maintainer guide is GITHUB_PAGES.md. It covers the published tree, how to enable Pages, the workflow, a local preview with make pages, CORS and the microphone, and troubleshooting. README and CONTRIBUTING point the live demo and /api/ at that guide. The README install samples use 0.6.0. Dokka for Klarinet and Klarinet Coroutines includes the coordinates, a playback and effects implementation, and the host steps for Android, Apple, JVM, and the browser.
