comparison projects/basic_passthru/render.cpp @ 56:3c3a1357657d newapi

Further API update to name three primary functions setup(), render() and cleanup(). Changed include paths so now can #include <BeagleRT.h>. Removed stale pru_rtaudio.bin file as this is now done as pru_rtaudio_bin.h. Updated examples to new API and fixed minor compiler warnings along the way. Network example needs further attention to compile.
author andrewm
date Wed, 15 Jul 2015 12:10:51 +0100
parents a6d223473ea2
children 1e629f126322
comparison
equal deleted inserted replaced
55:41d24dba6b74 56:3c3a1357657d
4 * Created on: Oct 24, 2014 4 * Created on: Oct 24, 2014
5 * Author: parallels 5 * Author: parallels
6 */ 6 */
7 7
8 8
9 #include "../../include/BeagleRT.h" 9 #include <BeagleRT.h>
10 #include "../../include/Utilities.h" 10 #include <Utilities.h>
11 #include <rtdk.h> 11 #include <rtdk.h>
12 12
13 // initialise_render() is called once before the audio rendering starts. 13 // setup() is called once before the audio rendering starts.
14 // Use it to perform any initialisation and allocation which is dependent 14 // Use it to perform any initialisation and allocation which is dependent
15 // on the period size or sample rate. 15 // on the period size or sample rate.
16 // 16 //
17 // userData holds an opaque pointer to a data structure that was passed 17 // userData holds an opaque pointer to a data structure that was passed
18 // in from the call to initAudio(). 18 // in from the call to initAudio().
19 // 19 //
20 // Return true on success; returning false halts the program. 20 // Return true on success; returning false halts the program.
21 21
22 bool initialise_render(BeagleRTContext *context, void *userData) 22 bool setup(BeagleRTContext *context, void *userData)
23 { 23 {
24 // Nothing to do here... 24 // Nothing to do here...
25 25
26 return true; 26 return true;
27 } 27 }
52 } 52 }
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 // cleanup_render() is called once at the end, after the audio has stopped. 57 // cleanup() is called once at the end, after the audio has stopped.
58 // Release any resources that were allocated in initialise_render(). 58 // Release any resources that were allocated in setup().
59 59
60 void cleanup_render(BeagleRTContext *context, void *userData) 60 void cleanup(BeagleRTContext *context, void *userData)
61 { 61 {
62 62
63 } 63 }