Skip to content

Commit

Permalink
FIXED: Ctrl+S didn't mute music (except death music).
Browse files Browse the repository at this point in the history
  • Loading branch information
NagyD committed Oct 24, 2020
1 parent 655aac6 commit 307abbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/ChangeLog.txt
Expand Up @@ -568,3 +568,4 @@ ADDED: You can now use quicksave and quickload while recording a replay.
FIXED: The prince can now grab a ledge at the bottom right corner of a room with no room below.
Details: https://forum.princed.org/viewtopic.php?p=30410#p30410
FIXED: Don't allow killing a skeleton in cheat mode.
FIXED: Ctrl+S didn't mute music (except death music).
2 changes: 1 addition & 1 deletion src/midi.c
Expand Up @@ -515,7 +515,7 @@ void midi_callback(void *userdata, Uint8 *stream, int len) {
advance_us = advance_frames * ONE_SECOND_IN_US / mixing_freq; // recalculate, in case the rounding up increased this.
short* temp_buffer = malloc(advance_frames * 4);
OPL3_GenerateStream(&opl_chip, temp_buffer, advance_frames);
if (enable_music) {
if (is_sound_on && enable_music) {
for (int sample = 0; sample < advance_frames * 2; ++sample) {
((short*)stream)[sample] += temp_buffer[sample];
}
Expand Down

0 comments on commit 307abbc

Please sign in to comment.