diff projects/analogDigitalDemo/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 567bd8f76714
line wrap: on
line diff
--- a/projects/analogDigitalDemo/render.cpp	Mon Jun 15 18:16:00 2015 +0100
+++ b/projects/analogDigitalDemo/render.cpp	Wed Jul 15 12:10:51 2015 +0100
@@ -4,14 +4,12 @@
  * Queen Mary, University of London
  */
 
-#include "../../include/BeagleRT.h"
-#include "../../include/Utilities.h"
+#include <BeagleRT.h>
+#include <Utilities.h>
 #include <cmath>
 #include <rtdk.h>
 
-/* TASK: declare any global variables you need here */
-
-// initialise_render() is called once before the audio rendering starts.
+// setup() is called once before the audio rendering starts.
 // Use it to perform any initialisation and allocation which is dependent
 // on the period size or sample rate.
 //
@@ -20,7 +18,7 @@
 //
 // Return true on success; returning false halts the program.
 
-bool initialise_render(BeagleRTContext *context, void *userData)
+bool setup(BeagleRTContext *context, void *userData)
 {
 	return true;
 }
@@ -83,14 +81,11 @@
 	return;
 
 }
-// cleanup_render() is called once at the end, after the audio has stopped.
-// Release any resources that were allocated in initialise_render().
 
-void cleanup_render(BeagleRTContext *context, void *userData)
+// 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)
 {
-	/* TASK:
-	 * If you allocate any memory, be sure to release it here.
-	 * You may or may not need anything in this function, depending
-	 * on your implementation.
-	 */
+	// Nothing to do here
 }