1
0
Fork 0
forked from len0rd/rockbox

MIDI: Fix ringing/beeks in music caused by improper parsing of some pitch bend events.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15252 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Stepan Moskovchenko 2007-10-21 19:47:33 +00:00
parent 6fac8fcc93
commit 47d8323deb
4 changed files with 47 additions and 6 deletions

View file

@ -299,10 +299,39 @@ static void sendEvent(struct Event * ev)
chPan[status_low]=d2;
return;
}
case CTRL_PWDEPTH:
case CTRL_DATAENT_MSB:
{
/* TODO: Update all deltas. Is this really needed? */
chPBDepth[status_low] = d2;
if(chLastCtrlMSB[status_low] == REG_PITCHBEND_MSB &&
chLastCtrlLSB[status_low] == REG_PITCHBEND_LSB)
{
// printf("Pitch bend depth set to %d\n", d2);
chPBDepth[status_low] = d2;
}
return;
}
case CTRL_NONREG_LSB:
{
chLastCtrlLSB[status_low] = 0xFF; /* Ignore nonregistered writes */
return;
}
case CTRL_NONREG_MSB:
{
chLastCtrlMSB[status_low] = 0xFF; /* Ignore nonregistered writes */
return;
}
case CTRL_REG_LSB:
{
chLastCtrlLSB[status_low] = d2;
return;
}
case CTRL_REG_MSB:
{
chLastCtrlMSB[status_low] = d2;
return;
}