Mercurial > hg > beaglert
diff examples/basic_FFT_phase_vocoder/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_FFT_phase_vocoder/render.cpp Fri May 27 13:58:20 2016 +0100 +++ b/examples/basic_FFT_phase_vocoder/render.cpp Fri May 27 14:34:41 2016 +0100 @@ -6,7 +6,7 @@ */ -#include <BeagleRT.h> +#include <Bela.h> #include <rtdk.h> #include <NE10.h> // NEON FFT library #include <cmath> @@ -100,7 +100,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) { midi.readFrom(0); midi.setParserCallback(midiCallback); @@ -129,7 +129,7 @@ } // Initialise auxiliary tasks - if((gFFTTask = BeagleRT_createAuxiliaryTask(&process_fft_background, 90, "fft-calculation")) == 0) + if((gFFTTask = Bela_createAuxiliaryTask(&process_fft_background, 90, "fft-calculation")) == 0) return false; rt_printf("You are listening to an FFT phase-vocoder with overlap-and-add.\n" "Use Midi Control Change to control:\n" @@ -204,7 +204,7 @@ // 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. -void render(BeagleRTContext* context, void* userData) +void render(BelaContext* context, void* userData) { float* audioIn = context->audioIn; float* audioOut = context->audioOut; @@ -250,7 +250,7 @@ //process_fft(gInputBuffer, gInputBufferPointer, gOutputBuffer, gOutputBufferPointer); gFFTInputBufferPointer = gInputBufferPointer; gFFTOutputBufferPointer = gOutputBufferWritePointer; - BeagleRT_scheduleAuxiliaryTask(gFFTTask); + Bela_scheduleAuxiliaryTask(gFFTTask); gSampleCount = 0; } @@ -261,7 +261,7 @@ // cleanup_render() is called once at the end, after the audio has stopped. // Release any resources that were allocated in initialise_render(). -void cleanup(BeagleRTContext* context, void* userData) +void cleanup(BelaContext* context, void* userData) { NE10_FREE(timeDomainIn); NE10_FREE(timeDomainOut);