Skip to content

chore(audio): diagnostic logs for silent playback on beta#359

Merged
mokn merged 3 commits intodevfrom
feat/audio-zones
Apr 13, 2026
Merged

chore(audio): diagnostic logs for silent playback on beta#359
mokn merged 3 commits intodevfrom
feat/audio-zones

Conversation

@mokn
Copy link
Copy Markdown
Collaborator

@mokn mokn commented Apr 13, 2026

Summary

Module-scope Howl cache (#358) deployed cleanly but beta audio is still silent. Re-adding targeted diagnostic logs so the next hard-refresh captures enough to pinpoint where the chain breaks.

What the logs capture

  • Mount counter + module state — catches triple-mount or provider remount cases
  • Playback effect entry/exit — did it fire? did keyEq short-circuit?
  • Howl callbacks — onload / onloaderror / onplay / onplayerror
  • Post-play snapshots at +500ms and +3000msplaying(), volume(), ctxState, Howler._muted, Howler.volume()
  • Unlock gesture — ctx resume with resolved state

The post-play snapshots are the key new signal — they tell us whether Howler thinks the Howl is playing at audible volume several seconds after play() was called. If playing=true, vol=0.25, ctxState='running' but user hears nothing, the issue is below Howler (OS routing, browser tab muted, etc.).

Test plan

  • 23 SoundContext tests pass
  • Client build clean
  • Hard refresh beta Dark Cave, capture full console, share with me

🤖 Generated with Claude Code

mokn and others added 2 commits April 13, 2026 15:49
…unts

MUDProvider swaps its internal component type when setupPromise resolves
(MUDContext.Provider → MUDProviderInner), which unmounts the entire
SoundProvider subtree. The previous ref-based Howl cache was destroyed
mid-load, producing "Decoding audio data failed" on the first Howl and
leaving the second mount's Howl in a silent state even though Howler
reported playback.

Moving the cache, activeTrack, and missingZoneWarned set to module scope
means the second mount sees the Howl already playing and no-ops via the
keyEq early return. Also strips the diagnostic console.logs now that the
root cause is identified, and adds __resetSoundForTests so the test suite
can reset module state between runs.

All 23 SoundContext tests pass against the new implementation.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…tion

Module-scope cache fix shipped but audio is still silent on beta. Adding
targeted logs to capture:
- mount counter + module state at each mount (catches triple-mount edge cases)
- keyEq no-op vs fresh-create branch of the playback effect
- Howl onload / onloaderror / onplay / onplayerror callbacks
- post-play snapshots at +500ms and +3s (playing?, volume?, ctxState?, Howler._muted?)
- unlock gesture ctx resume with resolved state

All 23 tests still pass; mock extended with Howler._muted and Howler.volume().

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 13, 2026 10:02pm
ud Error Error Apr 13, 2026 10:02pm
ud-api Ready Ready Preview, Comment Apr 13, 2026 10:02pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ud-api-beta Ignored Ignored Preview Apr 13, 2026 10:02pm

Request Review

# Conflicts:
#	packages/client/src/contexts/SoundContext.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant