diff core/default_libpd_render.cpp @ 480:4ff80956c27a prerelease

heavy supports digitals at message rate
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 21 Jun 2016 05:44:21 +0100
parents 838a4a4a8580
children dbc76783db2a
line wrap: on
line diff
--- a/core/default_libpd_render.cpp	Tue Jun 21 05:03:53 2016 +0100
+++ b/core/default_libpd_render.cpp	Tue Jun 21 05:44:21 2016 +0100
@@ -150,13 +150,18 @@
 		printf("Error file %s/%s not found. The %s file should be your main patch.\n", folder, file, file);
 		return false;
 	}
+
+	// analog setup
+	gAnalogChannelsInUse = context->analogChannels;
+
+	// digital setup
 	dcm.setCallback(sendDigitalMessage);
-	gAnalogChannelsInUse = context->analogChannels;
 	if(context->digitalChannels > 0){
 		for(unsigned int ch = 0; ch < context->digitalChannels; ++ch){
 			dcm.setCallbackArgument(ch, receiverNames[ch]);
 		}
 	}
+
 	midi.readFrom(0);
 	midi.writeTo(0);
 #ifdef PARSE_MIDI
@@ -347,7 +352,7 @@
 			}
 		}
 
-		//then digital
+		// Bela digital input
 		// note: in multiple places below we assume that the number of digitals is same as number of audio
 		// digital in at message-rate
 		dcm.processInput(&context->digital[audioFrameBase], gLibpdBlockSize);