diff options
author | Simon Howard | 2009-08-30 22:47:47 +0000 |
---|---|---|
committer | Simon Howard | 2009-08-30 22:47:47 +0000 |
commit | 628ba41ead3e50fe71581131fd2fa22c50739df6 (patch) | |
tree | 304a5f0794abeae775a164f2e332bcb1045a64b5 /src/i_oplmusic.c | |
parent | 61b2e3d2b8b6b2b6ddf8b92842ac4bcf47945160 (diff) | |
download | chocolate-doom-628ba41ead3e50fe71581131fd2fa22c50739df6.tar.gz chocolate-doom-628ba41ead3e50fe71581131fd2fa22c50739df6.tar.bz2 chocolate-doom-628ba41ead3e50fe71581131fd2fa22c50739df6.zip |
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
Diffstat (limited to 'src/i_oplmusic.c')
-rw-r--r-- | src/i_oplmusic.c | 4 |
1 files changed, 3 insertions, 1 deletions
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. |