feat(nests): T16 Phase 2 — JVM Opus + Rust↔Rust E2E interop test
Lands the test-side audio codec + the first end-to-end interop scenario through the harness: - JvmOpusEncoder / JvmOpusDecoder via club.minnced:opus-java 1.1.1 (JNA bindings + bundled libopus.so / .dylib / .dll natives). Verified by JvmOpusRoundTripTest — sine 440 Hz survives encode → decode with FFT peak preserved + ZCR within 5%. - SineWaveAudioCapture now paces to real time (20 ms / frame) rather than running open-loop. Mirrors how a real microphone source blocks on hardware; without it the broadcaster floods the relay at compute speed. - HangInteropTest.rust_hang_publish_to_rust_hang_listener_round_trip_440 drives hang-publish + hang-listen as subprocesses through the harness's moq-relay and asserts FFT peak / ZCR / sample-count on the decoded PCM. Verified green on Linux x86_64. - hang-publish gains --track-name (default "audio/data" matching Amethyst's MoqLiteNestsListener.AUDIO_TRACK) and decouples --relay-url from --broadcast so the URL path can be the namespace and the broadcast can be a relative announce suffix. - hang-listen's tail "cancelled" error is treated as EOF after any frames have been collected, so a clean publisher shutdown no longer surfaces as exit=1. The forward-direction I1 scenario (Amethyst Kotlin speaker → hang listener) is still gated by an open Amethyst-side wire issue: the audio uni stream delivers Group control headers but no frame payloads. Documented in nestsClient/plans/2026-05-06-cross-stack-interop-test-results.md with concrete pickup steps for a follow-up session. https://claude.ai/code/session_01ERJPUYfdLPwZ99pr5EcEcV
This commit is contained in:
@@ -74,6 +74,17 @@ kotlin {
|
||||
implementation(libs.kotlin.test)
|
||||
implementation(libs.kotlinx.coroutines.test)
|
||||
implementation(libs.secp256k1.kmp.jni.jvm)
|
||||
// JNA bindings + bundled libopus.so used by the cross-stack
|
||||
// interop tests (T16). The Android targets keep their
|
||||
// existing `MediaCodecOpusEncoder/Decoder`; only JVM
|
||||
// tests need a host-side codec, and `club.minnced:opus-java`
|
||||
// ships natives for linux-x86-64 / aarch64 / darwin / win32.
|
||||
// No Android dependency is added. opus-java-api declares
|
||||
// JNA as runtime-scope; Kotlin needs it at compile time to
|
||||
// resolve the `tomp2p.opuswrapper.Opus extends com.sun.jna.Library`
|
||||
// supertype, so pull it explicitly.
|
||||
implementation("club.minnced:opus-java:1.1.1")
|
||||
implementation("net.java.dev.jna:jna:5.14.0")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user