diff examples/mpr121/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 421a69d42943
line wrap: on
line diff
--- a/examples/mpr121/render.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/examples/mpr121/render.cpp	Fri May 27 14:34:41 2016 +0100
@@ -1,4 +1,4 @@
-#include <BeagleRT.h>
+#include <Bela.h>
 #include <Utilities.h>
 #include <cmath>
 #include <rtdk.h>
@@ -47,14 +47,14 @@
 //
 // Return true on success; returning false halts the program.
 
-bool setup(BeagleRTContext *context, void *userData)
+bool setup(BelaContext *context, void *userData)
 {
 	if(!mpr121.begin(1, 0x5A)) {
 		rt_printf("Error initialising MPR121\n");
 		return false;
 	}
 	
-	i2cTask = BeagleRT_createAuxiliaryTask(readMPR121, 50, "beaglert-mpr121");
+	i2cTask = Bela_createAuxiliaryTask(readMPR121, 50, "beaglert-mpr121");
 	readIntervalSamples = context->audioSampleRate / readInterval;
 	
 	for(int i = 0; i < NUM_TOUCH_PINS; i++) {
@@ -69,13 +69,13 @@
 // ADCs and DACs (if available). If only audio is available, numAnalogFrames
 // will be 0.
 
-void render(BeagleRTContext *context, void *userData)
+void render(BelaContext *context, void *userData)
 {
 	for(int n = 0; n < context->audioFrames; n++) {
 		// Keep this code: it schedules the touch sensor readings
 		if(++readCount >= readIntervalSamples) {
 			readCount = 0;
-			BeagleRT_scheduleAuxiliaryTask(i2cTask);
+			Bela_scheduleAuxiliaryTask(i2cTask);
 		}
 		
 		float sample = 0.0;
@@ -102,7 +102,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)
 {
 	// Nothing to do here
 }
@@ -126,4 +126,4 @@
 	
 	// You can use this to read binary on/off touch state more easily
 	//rt_printf("Touched: %x\n", mpr121.touched());
-}
\ No newline at end of file
+}