summaryrefslogtreecommitdiffstats
path: root/src/midi.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2023-12-02 17:44:20 +0200
committergramanas <anastasis.gramm2@gmail.com>2023-12-02 17:44:20 +0200
commit89b515395310c4e84a84992d3f0bd11f8ded6d03 (patch)
tree7c8554dedd0e6736a0b7db5d5f2285fbd31fe3f9 /src/midi.c
parent4f7de09c753ece6f2099512522d489b0104a59a8 (diff)
downloadsynth-project-89b515395310c4e84a84992d3f0bd11f8ded6d03.tar.gz
synth-project-89b515395310c4e84a84992d3f0bd11f8ded6d03.tar.bz2
synth-project-89b515395310c4e84a84992d3f0bd11f8ded6d03.zip
gui is mine
Diffstat (limited to 'src/midi.c')
-rw-r--r--src/midi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/midi.c b/src/midi.c
index 11029b0..389a670 100644
--- a/src/midi.c
+++ b/src/midi.c
@@ -123,12 +123,13 @@ void midi_decode(uint32_t msg, synth_t * synth) {
}
}
-
+int enable = 0;
void
midiCallback(PtTimestamp timestamp, void *userData) {
midi_t * m = (midi_t *)userData;
if (!m->stream) return;
+ if (!enable) return;
// if (!Pm_Poll(m->stream)) return;
@@ -174,6 +175,7 @@ init_midi(midi_t *m, synth_t *synth)
128,
NULL,
NULL);
+ enable = 1;
}
void