Lets a live microphone be streamed through BingBong from a relay rather
than over PEAK's Photon servers. This is the in-game client only: it
connects over a WebSocket, decodes the audio and plays it. The relay and
the web app that captures the microphone are not built yet, so the
feature does nothing on its own.
Playback uses OnAudioFilterRead rather than a streaming AudioClip. A clip
created with stream:true fills Unity's decode buffer ahead of playback,
and that read-ahead cannot be satisfied from a live stream because the
audio has not arrived yet -- the buffer drained to empty on a cycle no
matter how deep it was made, which was audible as constant clicking. The
filter callback runs in lockstep with playback, so demand can never
outrun real time.
Includes tools/stub_relay.py, a development stub speaking the same wire
format, so the client can be tested end to end without the real backend,
a microphone or a browser.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Player.EmptySlot and PhotonNetwork.InstantiateItemRoom each gained an
optional parameter, which compiles fine but left the previous build
calling signatures that no longer exist. The InstantiateItemRoom throw
escaped the BagsForEveryone postfix and took down every
SingleItemSpawner in the level, which is why backpacks and BingBong
stopped spawning and campfires no longer advanced the biome.
Also hardens that postfix so a future API change costs the extra bags
and nothing else, registers them with the spawner's SpawnedItemTracker,
and stops the Open Backpack keybind from opening the wheel while the
backpack is held in hand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Also removes a leftover debug keybind on the BingBong module that was
bound to P and would have fired alongside the new passport keybind.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>