Mercurial > hg > beaglert
diff examples/filter_IIR/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_IIR/render.cpp Fri May 27 13:58:20 2016 +0100 +++ b/examples/filter_IIR/render.cpp Fri May 27 14:34:41 2016 +0100 @@ -6,7 +6,7 @@ */ -#include <BeagleRT.h> // to schedule lower prio parallel process +#include <Bela.h> // to schedule lower prio parallel process #include <rtdk.h> #include <cmath> #include <stdio.h> @@ -53,7 +53,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 @@ -75,7 +75,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 sample = 0; @@ -101,8 +101,8 @@ } // Request that the lower-priority tasks run at next opportunity - BeagleRT_scheduleAuxiliaryTask(gChangeCoeffTask); - BeagleRT_scheduleAuxiliaryTask(gInputTask); + Bela_scheduleAuxiliaryTask(gChangeCoeffTask); + Bela_scheduleAuxiliaryTask(gInputTask); } // First calculation of coefficients @@ -139,10 +139,10 @@ bool initialise_aux_tasks() { - if((gChangeCoeffTask = BeagleRT_createAuxiliaryTask(&check_coeff, 90, "beaglert-check-coeff")) == 0) + if((gChangeCoeffTask = Bela_createAuxiliaryTask(&check_coeff, 90, "beaglert-check-coeff")) == 0) return false; - if((gInputTask = BeagleRT_createAuxiliaryTask(&read_input, 50, "beaglert-read-input")) == 0) + if((gInputTask = Bela_createAuxiliaryTask(&read_input, 50, "beaglert-read-input")) == 0) return false; rt_printf("Press 'a' to trigger sample, 's' to stop\n"); @@ -215,7 +215,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; }