Skip to content

Commit

Permalink
Give less goodness points to sustained notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Feb 22, 2019
1 parent e68d0fd commit 5aa5df1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/opnmidi_midiplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,11 +1327,10 @@ int64_t OPNMIDIplay::calculateChipChannelGoodness(size_t c, const MIDIchannel::N
for(OpnChannel::const_users_iterator j = chan.users.begin(); !j.is_end(); ++j)
{
const OpnChannel::LocationData &jd = j->value;
s -= 4000000;

int64_t kon_ms = jd.kon_time_until_neglible_us / 1000;
s -= (jd.sustained == OpnChannel::LocationData::Sustain_None) ?
kon_ms : (kon_ms / 2);
(4000000 + kon_ms) : (500000 + (kon_ms / 2));

MIDIchannel::notes_iterator
k = const_cast<MIDIchannel &>(m_midiChannels[jd.loc.MidCh]).find_activenote(jd.loc.note);
Expand Down

0 comments on commit 5aa5df1

Please sign in to comment.