ref: 628ba41ead3e50fe71581131fd2fa22c50739df6
parent: 61b2e3d2b8b6b2b6ddf8b92842ac4bcf47945160
author: Simon Howard <fraggle@gmail.com>
date: Sun Aug 30 18:47:47 EDT 2009
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
--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -660,6 +660,7 @@
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 @@
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 @@
// TODO: Set the volume level.
WriteRegister(OPL_REGS_LEVEL + voice->op2,
- volume_mapping_table[channel->volume]);
+ volume_mapping_table[volume]);
// Play the note.