summaryrefslogtreecommitdiffstats
path: root/src/midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/midi.c')
-rw-r--r--src/midi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/midi.c b/src/midi.c
index d9955d2..8452bcc 100644
--- a/src/midi.c
+++ b/src/midi.c
@@ -27,6 +27,7 @@ void midi_decode(uint32_t msg, synth_t * synth) {
synth->midi_note[data1].velocity = (float)data2 / 127.0;
synth->midi_note[data1].elapsed = 0;
synth->midi_note[data1].active = 1;
+ synth->active = 1;
break;
case 0x0A:
printf("Aftertouch: channel=%d, note=%d, pressure=%d\n", channel, data1, data2);
@@ -144,7 +145,7 @@ init_midi(midi_t *m, synth_t *synth)
void
terminate_midi(midi_t *m)
{
- Pm_Close(m->stream);
Pt_Stop();
+ Pm_Close(m->stream);
Pm_Terminate();
}