Mercurial > hg > beaglert
diff examples/oscillator_bank/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/oscillator_bank/render.cpp Fri May 27 13:58:20 2016 +0100 +++ b/examples/oscillator_bank/render.cpp Fri May 27 14:34:41 2016 +0100 @@ -6,7 +6,7 @@ */ -#include <BeagleRT.h> +#include <Bela.h> #include <Utilities.h> #include <rtdk.h> #include <cstdlib> @@ -58,7 +58,7 @@ // in from the call to initAudio(). // // Return true on success; returning false halts the program. -bool setup(BeagleRTContext *context, void *userData) +bool setup(BelaContext *context, void *userData) { srandom(time(NULL)); @@ -137,7 +137,7 @@ } // Initialise auxiliary tasks - if((gFrequencyUpdateTask = BeagleRT_createAuxiliaryTask(&recalculate_frequencies, 85, "beaglert-update-frequencies")) == 0) + if((gFrequencyUpdateTask = Bela_createAuxiliaryTask(&recalculate_frequencies, 85, "beaglert-update-frequencies")) == 0) return false; //for(int n = 0; n < gNumOscillators; n++) @@ -154,7 +154,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) { // Initialise buffer to 0 memset(context->audioOut, 0, 2 * context->audioFrames * sizeof(float)); @@ -179,7 +179,7 @@ } // Request that the lower-priority task run at next opportunity - //BeagleRT_scheduleAuxiliaryTask(gFrequencyUpdateTask); + //Bela_scheduleAuxiliaryTask(gFrequencyUpdateTask); } } @@ -210,7 +210,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(gWavetable); free(gPhases);