diff options
author | Simon Howard | 2013-06-19 20:50:09 +0000 |
---|---|---|
committer | Simon Howard | 2013-06-19 20:50:09 +0000 |
commit | 431b79530bea2f5666e0ca362773160ab7274f5d (patch) | |
tree | 7875b9ded180708aa7bc4819df8b986d6a41b280 /src/i_oplmusic.c | |
parent | 0fea3b6cd1c5e80aaed4a045d11025db34a83d7f (diff) | |
download | chocolate-doom-431b79530bea2f5666e0ca362773160ab7274f5d.tar.gz chocolate-doom-431b79530bea2f5666e0ca362773160ab7274f5d.tar.bz2 chocolate-doom-431b79530bea2f5666e0ca362773160ab7274f5d.zip |
Fix OPL MIDI playback on big endian systems (thanks GhostlyDeath).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2607
Diffstat (limited to 'src/i_oplmusic.c')
-rw-r--r-- | src/i_oplmusic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index d2116ddb..f6ca4c6d 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -736,7 +736,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); } @@ -853,7 +853,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; } @@ -920,7 +920,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); } |