Added new Audio Manager to manage Audio accross the game #207
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.
✅ PR Checklist
Tip
Please check the boxes below to confirm you followed the contribution guidelines:
[Type]: clear description of change
type
: Feature, Fix, Refactor, Docs, Test, Chore📝 What does this PR do?
🔗 Related Issue
📸 Screenshots / Demos (if applicable)
Note
🦖 No screenshots or demo provided.
💬 Extra Notes (Optional)
Note
🦕 No extra notes.
This PR introduces a major refactor to the audio system and general codebase improvements for Dinosaur Exploder.
Global audio control is now handled via a singleton AudioManager, allowing mute and volume to be managed consistently across all menus and gameplay.
Removed all per-component mute/volume logic and legacy sound code.
All sound and music playback now uses AudioManager and constants from GameConstants.
Cleaned up menu and controller code to avoid duplicate or broken audio logic.
Fixed resource path issues for sound files.
What's Working
Mute now works globally and instantly across the entire game.
Music and sound effects are played using the new AudioManager.
No more duplicate or broken sound logic in menus or gameplay.
Code is cleaner and easier to maintain.
Known Issues / To-Do
Audio volume slider is not fully functional yet:
Changing the volume updates the value in AudioManager, but some sound effects or music may not reflect the new volume immediately in all cases.
I am still working on a complete fix for this.
Some additional polish and testing is needed for edge cases (e.g., rapid menu switching, overlapping sounds).
Why Merge Now?
This PR is a significant step toward a more maintainable and user-friendly codebase.
It enables easier future improvements and bugfixes.
Merging now will allow others to build on top of the new audio system and help test the changes.
Note:
If you encounter any issues with audio or have suggestions for further improvements, please comment on this PR or open a new issue!
Next steps:
Finalize and test the volume slider for all audio.
Continue general codebase cleanup and bugfixes.
Thank you for reviewing!