Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/config/config_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
*/
// #define COMPLETE_SAVE_FILE

/**
* Mute all level and secondary music. Useful for still being able to listen to game sound effects
* during development without being subject to the same old music over and over and over and over...
*/
// #define MUTE_MUSIC_PLAYERS

/**
* Removes the limit on FPS.
*/
Expand Down
1 change: 1 addition & 0 deletions include/config/config_safeguards.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#undef VISUAL_DEBUG
#undef UNLOCK_ALL
#undef COMPLETE_SAVE_FILE
#undef MUTE_MUSIC_PLAYERS
#undef UNLOCK_FPS
#undef VANILLA_DEBUG
#undef DEBUG_FORCE_CRASH_ON_BOOT
Expand Down
11 changes: 11 additions & 0 deletions src/audio/effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,21 @@ static void sequence_channel_process_sound(struct SequenceChannel *seqChannel) {
if (!hasProcessedChannel) {
hasProcessedChannel = TRUE;

#ifdef MUTE_MUSIC_PLAYERS
if (seqChannel->seqPlayer == &gSequencePlayers[SEQ_PLAYER_SFX]) {
channelVolume = seqChannel->volume * seqChannel->volumeScale * seqChannel->seqPlayer->fadeVolume;
if (seqChannel->seqPlayer->muted && (seqChannel->muteBehavior & MUTE_BEHAVIOR_SOFTEN) != 0) {
channelVolume *= seqChannel->seqPlayer->muteVolumeScale;
}
} else {
channelVolume = 0;
}
#else
channelVolume = seqChannel->volume * seqChannel->volumeScale * seqChannel->seqPlayer->fadeVolume;
if (seqChannel->seqPlayer->muted && (seqChannel->muteBehavior & MUTE_BEHAVIOR_SOFTEN) != 0) {
channelVolume *= seqChannel->seqPlayer->muteVolumeScale;
}
#endif

panFromChannel = seqChannel->pan * seqChannel->panChannelWeight;
panLayerWeight = 1.0f - seqChannel->panChannelWeight;
Expand Down