Mercurial > hg > beaglert
comparison examples/analogDigitalDemo/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 |
comparison
equal
deleted
inserted
replaced
300:dbeed520b014 | 301:e4392164b458 |
---|---|
2 * | 2 * |
3 * Andrew McPherson and Victor Zappi | 3 * Andrew McPherson and Victor Zappi |
4 * Queen Mary, University of London | 4 * Queen Mary, University of London |
5 */ | 5 */ |
6 | 6 |
7 #include <BeagleRT.h> | 7 #include <Bela.h> |
8 #include <Utilities.h> | 8 #include <Utilities.h> |
9 #include <cmath> | 9 #include <cmath> |
10 #include <rtdk.h> | 10 #include <rtdk.h> |
11 | 11 |
12 // setup() is called once before the audio rendering starts. | 12 // setup() is called once before the audio rendering starts. |
16 // userData holds an opaque pointer to a data structure that was passed | 16 // userData holds an opaque pointer to a data structure that was passed |
17 // in from the call to initAudio(). | 17 // in from the call to initAudio(). |
18 // | 18 // |
19 // Return true on success; returning false halts the program. | 19 // Return true on success; returning false halts the program. |
20 | 20 |
21 bool setup(BeagleRTContext *context, void *userData) | 21 bool setup(BelaContext *context, void *userData) |
22 { | 22 { |
23 return true; | 23 return true; |
24 } | 24 } |
25 | 25 |
26 // render() is called regularly at the highest priority by the audio engine. | 26 // render() is called regularly at the highest priority by the audio engine. |
27 // Input and output are given from the audio hardware and the other | 27 // Input and output are given from the audio hardware and the other |
28 // ADCs and DACs (if available). If only audio is available, numAnalogFrames | 28 // ADCs and DACs (if available). If only audio is available, numAnalogFrames |
29 // will be 0. | 29 // will be 0. |
30 | 30 |
31 void render(BeagleRTContext *context, void *userData) | 31 void render(BelaContext *context, void *userData) |
32 /* | 32 /* |
33 we assume that gNumAnalogChannels=8, numAnalogFrames==8 and numDigitalFrames==numAudioFrames | 33 we assume that gNumAnalogChannels=8, numAnalogFrames==8 and numDigitalFrames==numAudioFrames |
34 * */ | 34 * */ |
35 { | 35 { |
36 /* | 36 /* |
86 } | 86 } |
87 | 87 |
88 // cleanup() is called once at the end, after the audio has stopped. | 88 // cleanup() is called once at the end, after the audio has stopped. |
89 // Release any resources that were allocated in setup(). | 89 // Release any resources that were allocated in setup(). |
90 | 90 |
91 void cleanup(BeagleRTContext *context, void *userData) | 91 void cleanup(BelaContext *context, void *userData) |
92 { | 92 { |
93 // Nothing to do here | 93 // Nothing to do here |
94 } | 94 } |