summaryrefslogtreecommitdiff
path: root/src/i_oplmusic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_oplmusic.c')
-rw-r--r--src/i_oplmusic.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c
index cd331897..d32a163e 100644
--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -701,10 +701,15 @@ static unsigned int FrequencyForVoice(opl_voice_t *voice)
note = voice->note;
- // Apply note offset:
+ // Apply note offset.
+ // Don't apply offset if the instrument is a fixed note instrument.
gm_voice = &voice->current_instr->voices[voice->current_instr_voice];
- note += (signed short) SHORT(gm_voice->base_note_offset);
+
+ if ((voice->current_instr->flags & GENMIDI_FLAG_FIXED) == 0)
+ {
+ note += (signed short) SHORT(gm_voice->base_note_offset);
+ }
// Avoid possible overflow due to base note offset: