Skip to content

Basic audio hooks - #85

Merged
deanblackborough merged 5 commits into
mainfrom
basic-audio
Jul 1, 2026
Merged

Basic audio hooks#85
deanblackborough merged 5 commits into
mainfrom
basic-audio

Conversation

@deanblackborough

@deanblackborough deanblackborough commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added basic in-app audio support with sound playback that can be enabled or disabled.
    • Introduced scene event signals for actions like firing, jumping, hits, enemy defeats, and round resets.
    • Added an Audio menu with sound toggle and device availability status.
  • Bug Fixes
    • Scene event queues now reset correctly when loading scenes and during runtime transitions.
  • Documentation
    • Updated project readiness notes and the development roadmap to reflect the latest short-term priorities.

@deanblackborough
deanblackborough merged commit 7e38bab into main Jul 1, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 050c6880-8033-4e4e-98fe-cac6701b8495

📥 Commits

Reviewing files that changed from the base of the PR and between b7b9434 and 00b785f.

⛔ Files ignored due to path filters (3)
  • assets/sound-effects/explosion.wav is excluded by !**/*.wav
  • assets/sound-effects/jump.wav is excluded by !**/*.wav
  • assets/sound-effects/shoot.wav is excluded by !**/*.wav
📒 Files selected for processing (18)
  • CMakeLists.txt
  • DECISIONS.md
  • NOTES.md
  • README.md
  • src/prune/app/app.cpp
  • src/prune/app/app.hpp
  • src/prune/audio/audio_system.cpp
  • src/prune/audio/audio_system.hpp
  • src/prune/scene/artillery/artillery_behaviour.cpp
  • src/prune/scene/platformer/platformer_behaviour.cpp
  • src/prune/scene/scene.hpp
  • src/prune/scene/scene_event.hpp
  • src/prune/scene/scene_state.hpp
  • src/prune/scene/simple_shooter/simple_shooter_behaviour.cpp
  • src/prune/scene/world_scene.cpp
  • src/prune/scene/world_scene.hpp
  • src/prune/tooling/ui.cpp
  • src/prune/tooling/ui.hpp

📝 Walkthrough

Walkthrough

Right then, recruit — pull up a chair. This PR wires up a lightweight event bus (SceneEventQueue) that gameplay behaviours (artillery, platformer, simple shooter) can shout into without knowing or caring who's listening. A brand-new AudioSystem listens in, mapping scene event IDs to SDL-loaded sounds and mixing active voices in a device callback. App now owns and drives the audio system's lifecycle, and Ui grows an Audio menu to toggle sound. Docs and notes are refreshed to match.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: enhancement


A jump, a shot, a tank laid low —
Each scene now whispers where to go.
No wires to sound, no calls direct,
Just events emitted, audio to detect.
Mix your voices, cap them tight —
Ship it clean, and sleep at night. 🐇🔊

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch basic-audio

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant