Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
The PR standardizes and clarifies audio subsystem naming, replaces magic values with named constants, and prunes legacy declarations.
- Renamed sfx and snd functions/macros for consistent
sfx_andsnd_prefixes, and replaced hard-coded masks/limits with named macros. - Updated public/private headers to expose the new API surface and removed obsolete stubs.
- Improved code comments and removed some outdated logic comments.
Reviewed Changes
Copilot reviewed 585 out of 585 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/audio/sfx_control.c | Refactored special-sound detection and renamed related functions. |
| src/audio/public.h | Added new API declarations; removed old stubs. |
| src/audio/core/reverb.c | Renamed reverb helper functions; simplified buffer swap macro. |
| src/audio/mseq_player.c | Renamed ambient functions to mseq; updated fade calculations. |
| src/audio/ambience.c | Renamed ambient state flags to “AMBIENCE_” prefix. |
Comments suppressed due to low confidence (5)
src/audio/core/reverb.c:5
- The
SWAP16macro is incomplete and uses an undefined variablet. Restore the correct swap logic (e.g., using a temporary variable) to ensure it actually swaps the two values.
#define SWAP16(in, out) \
src/audio/ambience.c:12
- [nitpick] The enum is named
AmbientSoundStatebut its values useAMBIENCE_prefixes. Consider renaming the enum toAmbienceSoundStatefor consistency.
typedef enum AmbientSoundState {
src/audio/sfx_control.c:534
- The masking logic may be incorrect: combining FLAG and MASK bits could mis-detect looping sounds. Consider using
(soundID & SOUND_ID_TYPE_MASK) == SOUND_TYPE_LOOPINGfor clarity.
if ((soundID & (SOUND_ID_TYPE_FLAG | SOUND_ID_TYPE_MASK)) == (SOUND_ID_TYPE_FLAG | SOUND_TYPE_LOOPING)) {
src/audio/public.h:9
- Duplicate declaration of
snd_notify_engine_ready; please remove the redundant prototype to avoid confusion.
void snd_notify_engine_ready(ALHeap* heap);
src/audio/mseq_player.c:273
- This in-code
@bugcomment is a TODO; consider removing or turning it into an actionable issue rather than leaving it in production code.
// potential @bug, any voice which is not properly released via MSEQ_CMD_80_STOP_SOUND will eventaully
ethteck
reviewed
May 28, 2025
z64a
commented
May 28, 2025
bates64
requested changes
Jun 14, 2025
bates64
approved these changes
Jun 15, 2025
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.
All audio source files, functions, and data are named and partially documented.