diff include/PulseIn.h @ 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 3c3d14654b7f
children 493a07f6ec09
line wrap: on
line diff
--- a/include/PulseIn.h	Fri May 27 13:58:20 2016 +0100
+++ b/include/PulseIn.h	Fri May 27 14:34:41 2016 +0100
@@ -8,7 +8,7 @@
 #ifndef PULSEIN_H_
 #define PULSEIN_H_
 
-#include <BeagleRT.h>
+#include <Bela.h>
 #include <vector>
 class PulseIn {
 private:
@@ -23,7 +23,7 @@
 		_digitalInput = -1;
 	};
 
-	PulseIn(BeagleRTContext* context, unsigned int digitalInput, int direction=1){
+	PulseIn(BelaContext* context, unsigned int digitalInput, int direction=1){
 		init(context, digitalInput, direction);
 	};
 	/**
@@ -36,7 +36,7 @@
 	 *  can be 1 to detect positive pulses, e.g.:( 0 0 0 0 1 1 0 0 0 0 0)
 	 *  or -1 to detect negative pulses, e.g.: ( 1 1 1 1 0 0 1 1 1 1)
 	 */
-	void init(BeagleRTContext* context, unsigned int digitalInput, int direction=1);
+	void init(BelaContext* context, unsigned int digitalInput, int direction=1);
 
 	/**
 	 * Detects pulses.
@@ -48,16 +48,16 @@
 	 * Also, results are cached (i.e.: we do not check() for pulses twice for the same context.
 	 * context->audioSampleCount is used as an identifier.
 	 */
-	void check(BeagleRTContext* context);
+	void check(BelaContext* context);
 
 	/**
 	 * Looks for the end of a pulse.
 	 *
-	 * @param context the current BeagleRTContext
+	 * @param context the current BelaContext
 	 * @param frame the frame at which to check if a pulse was detected.
 	 * @return the length of the pulse if a pulse ending was detected at sample n, zero otherwise.
 	 */
-	int hasPulsed(BeagleRTContext* context, int frame){//let's leave this in PulseIn.h to allow the compiler to optimize out the call.
+	int hasPulsed(BelaContext* context, int frame){//let's leave this in PulseIn.h to allow the compiler to optimize out the call.
 		if(_lastContext != context->audioSampleCount){ // check for pulses in the whole context and cache the result
 			check(context);
 		}