summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/sequencer.c
diff options
context:
space:
mode:
authorStepan Moskovchenko <stevenm@rockbox.org>2007-10-21 19:47:33 +0000
committerStepan Moskovchenko <stevenm@rockbox.org>2007-10-21 19:47:33 +0000
commit47d8323deb8c7351c66a89599f15b60e06a5b814 (patch)
treef046f7e1786930311b76a65b8a014ce7d1ee3a13 /apps/plugins/midi/sequencer.c
parent6fac8fcc93fa1fc8a6f288f57258f1c8443cf9db (diff)
downloadrockbox-47d8323deb8c7351c66a89599f15b60e06a5b814.tar.gz
rockbox-47d8323deb8c7351c66a89599f15b60e06a5b814.zip
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
Diffstat (limited to 'apps/plugins/midi/sequencer.c')
-rw-r--r--apps/plugins/midi/sequencer.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c
index 536d411902..c4ddfcf95a 100644
--- a/apps/plugins/midi/sequencer.c
+++ b/apps/plugins/midi/sequencer.c
@@ -299,10 +299,39 @@ static void sendEvent(struct Event * ev)
299 chPan[status_low]=d2; 299 chPan[status_low]=d2;
300 return; 300 return;
301 } 301 }
302 case CTRL_PWDEPTH: 302 case CTRL_DATAENT_MSB:
303 { 303 {
304 /* TODO: Update all deltas. Is this really needed? */ 304 /* TODO: Update all deltas. Is this really needed? */
305 chPBDepth[status_low] = d2; 305 if(chLastCtrlMSB[status_low] == REG_PITCHBEND_MSB &&
306 chLastCtrlLSB[status_low] == REG_PITCHBEND_LSB)
307 {
308// printf("Pitch bend depth set to %d\n", d2);
309 chPBDepth[status_low] = d2;
310 }
311 return;
312 }
313
314 case CTRL_NONREG_LSB:
315 {
316 chLastCtrlLSB[status_low] = 0xFF; /* Ignore nonregistered writes */
317 return;
318 }
319
320 case CTRL_NONREG_MSB:
321 {
322 chLastCtrlMSB[status_low] = 0xFF; /* Ignore nonregistered writes */
323 return;
324 }
325
326 case CTRL_REG_LSB:
327 {
328 chLastCtrlLSB[status_low] = d2;
329 return;
330 }
331
332 case CTRL_REG_MSB:
333 {
334 chLastCtrlMSB[status_low] = d2;
306 return; 335 return;
307 } 336 }
308 337