From 92475f873c373bc796c59a763ff7355126bbfd9d Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 3 May 2018 14:45:38 +0200 Subject: [PATCH] Fixes. --- MicroDexed.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index c1575c4..39ea6aa 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -32,7 +32,7 @@ void setup() Serial.println(F("MicroDexed")); MIDI.begin(MIDI_CHANNEL_OMNI); - + #ifdef TEENSY // Audio connections require memory to work. For more // detailed information, see the MemoryAndCpuUsage example @@ -56,18 +56,18 @@ void loop() audio_buffer = queue1.getBuffer(); #endif - //memset(buf, 0, 128); - // process midi->audio - while(MIDI.read()) + while (MIDI.read()) { - dexed->ProcessMidiMessage((byte)MIDI.getType(),(byte)MIDI.getData1(),(byte)MIDI.getData2()); + dexed->ProcessMidiMessage(MIDI.getType(), MIDI.getData1(), MIDI.getData2()); } dexed->GetSamples(audio_buffer); - + #ifdef TEENSY // play the current buffer + while(!queue1.available()); + queue1.playBuffer(); #endif }