From 56a6af426972ed2a334ae7001d19854aca964a75 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 11 Oct 2009 21:47:07 +0000 Subject: Don't apply base note offset if the instrument is a fixed note instrument. This should stop the ugly bleeping from the electric snare on E1M2. Subversion-branch: /branches/opl-branch Subversion-revision: 1715 --- src/i_oplmusic.c | 9 +++++++-- 1 file 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: -- cgit v1.2.3