diff examples/basic_libpd/render.cpp @ 301:e4392164b458 prerelease

RENAMED BeagleRT to Bela AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, scripts probably not working
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 27 May 2016 14:34:41 +0100
parents dbeed520b014
children 1feb9c23ac57
line wrap: on
line diff
--- a/examples/basic_libpd/render.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/examples/basic_libpd/render.cpp	Fri May 27 14:34:41 2016 +0100
@@ -5,7 +5,7 @@
  *      Author: parallels
  */
 
-#include <BeagleRT.h>
+#include <Bela.h>
 #include <cmath>
 #include <Utilities.h>
 #include <I2c_Codec.h>
@@ -34,7 +34,7 @@
   printf("noteon: %d %d %d\n", ch, pitch, vel);
 }
 
-void BeagleRT_printHook(const char *recv){
+void Bela_printHook(const char *recv){
 	rt_printf("%s", recv);
 }
 
@@ -49,7 +49,7 @@
 }
 
 AuxiliaryTask  udpReadTask;
-bool setup(BeagleRTContext *context, void *userData)
+bool setup(BelaContext *context, void *userData)
 {
 	gChannelsInUse = min((int)(context->analogChannels+context->audioChannels), (int)gChannelsInUse);
 	udpServer.bindToPort(1234);
@@ -70,7 +70,7 @@
 //	}
 	//following lines borrowed from libpd/samples/c/pdtest/pdtest.c
 	// init pd
-	libpd_set_printhook(BeagleRT_printHook); // set this before calling libpd_init
+	libpd_set_printhook(Bela_printHook); // set this before calling libpd_init
 	libpd_set_noteonhook(pdnoteon);
 	libpd_init();
 	//TODO: analyse the ASCII of the patch file and find the in/outs to use
@@ -91,8 +91,8 @@
 	// open patch       [; pd open file folder(
 	libpd_openfile(file, folder);
     
-	udpReadTask = BeagleRT_createAuxiliaryTask(udpRead, 60, "udpReadTask");
-	BeagleRT_scheduleAuxiliaryTask(udpReadTask);
+	udpReadTask = Bela_createAuxiliaryTask(udpRead, 60, "udpReadTask");
+	Bela_scheduleAuxiliaryTask(udpReadTask);
 	return true;
 }
 
@@ -100,8 +100,8 @@
 // Input and output are given from the audio hardware and the other
 // ADCs and DACs (if available). If only audio is available, numMatrixFrames
 // will be 0.
-BeagleRTContext *c;
-void render(BeagleRTContext *context, void *userData)
+BelaContext *c;
+void render(BelaContext *context, void *userData)
 {
 	static int inW = 0;
 	static int outR = 0;
@@ -180,7 +180,7 @@
 // cleanup() is called once at the end, after the audio has stopped.
 // Release any resources that were allocated in setup().
 
-void cleanup(BeagleRTContext *context, void *userData)
+void cleanup(BelaContext *context, void *userData)
 {
 	free(gInBuf);
 	free(gOutBuf);