changeset 357:f3dd39be15e4 prerelease

Cleanup
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 08 Jun 2016 22:03:50 +0100
parents 44e4962ee37a
children 5c2f94105c58
files examples/basic_libpd/render.cpp
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/examples/basic_libpd/render.cpp	Wed Jun 08 21:15:14 2016 +0100
+++ b/examples/basic_libpd/render.cpp	Wed Jun 08 22:03:50 2016 +0100
@@ -50,8 +50,6 @@
 static DigitalChannelManager dcm;
 //UdpServer udpServer;
 
-
-
 void sendDigitalMessage(bool state, unsigned int delay, void* receiverName){
 	libpd_float((char*)receiverName, (float)state);
 //	rt_printf("%s: %d\n", (char*)receiverName, state);
@@ -99,22 +97,18 @@
 }
 
 void Bela_floatHook(const char *source, float value){
-//	rt_printf("received: %s %f\n", source, value);
 	// let's make this as optimized as possible for built-in digital Out parsing
 	// the built-in digital receivers are of the form "bela_digitalOutXX" where XX is between 11 and 26
 	static int prefixLength = 15; // strlen("bela_digitalOut")
 	if(strncmp(source, "bela_digitalOut", prefixLength)==0){
 		if(source[prefixLength] != 0){ //the two ifs are used instead of if(strlen(source) >= prefixLength+2)
 			if(source[prefixLength + 1] != 0){
-			// quickly convert the suffix to integer, assuming they are numbers, avoiding to call atoi
+				// quickly convert the suffix to integer, assuming they are numbers, avoiding to call atoi
 				int receiver = ((source[prefixLength] - 48) * 10);
 				receiver += (source[prefixLength+1] - 48);
-//				rt_printf("received on digital %d value %.0f\n", receiver, value);
 				unsigned int channel = receiver - 11; // go back to the actual Bela digital channel number
 				if(channel >= 0 && channel < 16){ //16 is the hardcoded value for the number of digital channels
-					//TODO: here we should check if this channel has been registered as message-rate output
 					dcm.setValue(channel, value);
-//					rt_printf("clear 0x%x set 0x%x\n", clearDataOut, setDataOut);
 				}
 			}
 		}
@@ -165,7 +159,7 @@
 	libpd_set_noteonhook(pdnoteon);
 	//TODO: add hooks for other midi events and generate MIDI output appropriately
 	libpd_init();
-	//TODO: ideally, we would analyse the ASCII of the patch file and find the in/outs to use
+	//TODO: ideally, we would analyse the ASCII of the patch file and find out which in/outs to use
 	libpd_init_audio(gChannelsInUse, gChannelsInUse, context->audioSampleRate);
 	gInBuf = libpd_get_sys_soundin();
 	gOutBuf = libpd_get_sys_soundout();