summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2013-09-08 19:10:40 +0000
committerSimon Howard2013-09-08 19:10:40 +0000
commitf2c204ccca3b93b318cda3aebf29592aa30385e4 (patch)
treed63ddaa28421cccdf9789673cd2cb2dc688fb982 /src
parentf3afff090adb5af99dc6e1929a9907bf72fda920 (diff)
parente10af52152ba793d983497cd86d7ccc10d32a13d (diff)
downloadchocolate-doom-f2c204ccca3b93b318cda3aebf29592aa30385e4.tar.gz
chocolate-doom-f2c204ccca3b93b318cda3aebf29592aa30385e4.tar.bz2
chocolate-doom-f2c204ccca3b93b318cda3aebf29592aa30385e4.zip
Merge from trunk.
Subversion-branch: /branches/v2-branch Subversion-revision: 2639
Diffstat (limited to 'src')
-rw-r--r--src/i_oplmusic.c6
-rw-r--r--src/midifile.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c
index 3d309715..62cbaca7 100644
--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -735,7 +735,7 @@ static unsigned int FrequencyForVoice(opl_voice_t *voice)
gm_voice = &voice->current_instr->voices[voice->current_instr_voice];
- if ((voice->current_instr->flags & GENMIDI_FLAG_FIXED) == 0)
+ if ((SHORT(voice->current_instr->flags) & GENMIDI_FLAG_FIXED) == 0)
{
note += (signed short) SHORT(gm_voice->base_note_offset);
}
@@ -852,7 +852,7 @@ static void VoiceKeyOn(opl_channel_data_t *channel,
// Work out the note to use. This is normally the same as
// the key, unless it is a fixed pitch instrument.
- if ((instrument->flags & GENMIDI_FLAG_FIXED) != 0)
+ if ((SHORT(instrument->flags) & GENMIDI_FLAG_FIXED) != 0)
{
voice->note = instrument->fixed_note;
}
@@ -919,7 +919,7 @@ static void KeyOnEvent(opl_track_data_t *track, midi_event_t *event)
VoiceKeyOn(channel, instrument, 0, key, volume);
- if ((instrument->flags & GENMIDI_FLAG_2VOICE) != 0)
+ if ((SHORT(instrument->flags) & GENMIDI_FLAG_2VOICE) != 0)
{
VoiceKeyOn(channel, instrument, 1, key, volume);
}
diff --git a/src/midifile.c b/src/midifile.c
index e9af051c..00ff28d4 100644
--- a/src/midifile.c
+++ b/src/midifile.c
@@ -706,7 +706,7 @@ int MIDI_GetNextEvent(midi_track_iter_t *iter, midi_event_t **event)
unsigned int MIDI_GetFileTimeDivision(midi_file_t *file)
{
- return file->header.time_division;
+ return SHORT(file->header.time_division);
}
void MIDI_RestartIterator(midi_track_iter_t *iter)