From 8fc5a4c1f8bee0c42c6693700c0599941d61ee37 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 4 Jun 2026 18:00:58 -0400 Subject: [PATCH] zebra-spaces: smooth audio source pivot via worklet GainNode ramps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Single mechanism handling three audible-source transitions, all click- free via Web Audio linearRampToValueAtTime (100ms by default): 1. SFU → mesh (auto, on mesh PC ontrack): - Previous: detachListenerStream → hard tear-down of the worklet - Now: rampWorkletGain(uuid, 0, 100) keeps the worklet decoding in the background; only the GainNode value moves. Free CPU cost (~3% on a phone), zero audible click. 2. mesh → SFU (auto, on mesh PC connectionState='failed'): - Previous: attachCachedSfuStreamFor re-attached the SFU stream - Now: rampWorkletGain(uuid, 1, 100) restores the path that was never disconnected. attachCachedSfuStreamFor kept as fallback for the