feat: add Web Audio API sound system - #19
Open
drumst0ck wants to merge 2 commits into
Open
Conversation
…on sounds - Implement centralized audio manager using Web Audio API - Zero-latency playback via pre-decoded AudioBuffers - Hardware-accelerated, mobile-friendly architecture - Real-time master volume control via GainNode - Add global click sound on all interactive buttons - Add notification sound for new inbox messages - Add audio settings: master volume, SFX toggle, music toggle - Include Kenney interface sounds (CC0) for click and notification - Add contributor guide at docs/ADDING_AUDIO.md
…audio-conflicts # Conflicts: # src/App.tsx # src/pages/Settings.tsx # src/store/settingsStore.test.ts # src/store/settingsStore.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #18
This PR introduces a centralized audio system using the Web Audio API for zero-latency, hardware-accelerated sound playback across the app.
What's New
Audio Engine (
src/lib/audioManager.ts)Global Sound Effects
public/sounds/click.ogg) — plays on every<button>and[role="button"]click viaGlobalClickSound.tsxpublic/sounds/notification.ogg) — plays when a new inbox message arrives viaGlobalNotificationSound.tsxAudio Settings
New section in Settings with:
Contributor Documentation
docs/ADDING_AUDIO.mdexplains:Assets
public/sounds/click.oggpublic/sounds/notification.oggTesting
docs/ADDING_AUDIO.mdrenders correctlyChecklist
developbranchdocs/ADDING_AUDIO.md)