From 628ba41ead3e50fe71581131fd2fa22c50739df6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 30 Aug 2009 22:47:47 +0000 Subject: Use the pedal speed value for the volume. This sounds better, but it's still not right. Subversion-branch: /branches/opl-branch Subversion-revision: 1646 --- src/i_oplmusic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index d844fd7b..db7e0ffc 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -660,6 +660,7 @@ static void NoteOnEvent(opl_track_data_t *track, midi_event_t *event) opl_voice_t *voice; opl_channel_data_t *channel; unsigned int note; + unsigned int volume; printf("note on: channel %i, %i, %i\n", event->data.channel.channel, @@ -670,6 +671,7 @@ static void NoteOnEvent(opl_track_data_t *track, midi_event_t *event) channel = &track->channels[event->data.channel.channel]; note = event->data.channel.param1; + volume = event->data.channel.param2; // Percussion channel (10) is treated differently to normal notes. @@ -703,7 +705,7 @@ static void NoteOnEvent(opl_track_data_t *track, midi_event_t *event) // TODO: Set the volume level. WriteRegister(OPL_REGS_LEVEL + voice->op2, - volume_mapping_table[channel->volume]); + volume_mapping_table[volume]); // Play the note. -- cgit v1.2.3