diff examples/filter_FIR/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/filter_FIR/render.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/examples/filter_FIR/render.cpp	Fri May 27 14:34:41 2016 +0100
@@ -6,7 +6,7 @@
  */
 
 
-#include <BeagleRT.h>
+#include <Bela.h>
 #include <cmath>
 #include <NE10.h>					// neon library
 #include "SampleData.h"
@@ -22,7 +22,7 @@
 ne10_uint32_t blockSize;
 ne10_float32_t *gFIRfilterState;
 
-void initialise_filter(BeagleRTContext *context);
+void initialise_filter(BelaContext *context);
 
 // Task for handling the update of the frequencies using the matrix
 AuxiliaryTask gTriggerSamplesTask;
@@ -39,7 +39,7 @@
 //
 // Return true on success; returning false halts the program.
 
-bool setup(BeagleRTContext *context, void *userData)
+bool setup(BelaContext *context, void *userData)
 {
 
 	// Retrieve a parameter passed in from the initAudio() call
@@ -61,7 +61,7 @@
 // ADCs and DACs (if available). If only audio is available, numMatrixFrames
 // will be 0.
 
-void render(BeagleRTContext *context, void *userData)
+void render(BelaContext *context, void *userData)
 {
 	for(unsigned int n = 0; n < context->audioFrames; n++) {
 		float in = 0;
@@ -85,12 +85,12 @@
 
 
 	// Request that the lower-priority task run at next opportunity
-	BeagleRT_scheduleAuxiliaryTask(gTriggerSamplesTask);
+	Bela_scheduleAuxiliaryTask(gTriggerSamplesTask);
 }
 
 // Initialise NE10 data structures to define FIR filter
 
-void initialise_filter(BeagleRTContext *context)
+void initialise_filter(BelaContext *context)
 {
 	blockSize = context->audioFrames;
 	gFIRfilterState	= (ne10_float32_t *) NE10_MALLOC ((FILTER_TAP_NUM+blockSize-1) * sizeof (ne10_float32_t));
@@ -105,7 +105,7 @@
 
 bool initialise_trigger()
 {
-	if((gTriggerSamplesTask = BeagleRT_createAuxiliaryTask(&trigger_samples, 50, "beaglert-trigger-samples")) == 0)
+	if((gTriggerSamplesTask = Bela_createAuxiliaryTask(&trigger_samples, 50, "beaglert-trigger-samples")) == 0)
 		return false;
 
 	rt_printf("Press 'a' to trigger sample, 's' to stop\n");
@@ -151,7 +151,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)
 {
 	delete[] gSampleData.samples;