diff include/PulseIn.h @ 311:493a07f6ec09 prerelease

Renamed BelaContext->audioSampleCount to BelaContext->audioFramesElapsed for consistency of terminology
author andrewm
date Fri, 27 May 2016 18:37:51 +0100
parents e4392164b458
children
line wrap: on
line diff
--- a/include/PulseIn.h	Fri May 27 18:29:20 2016 +0100
+++ b/include/PulseIn.h	Fri May 27 18:37:51 2016 +0100
@@ -46,7 +46,7 @@
 	 * than hasPulsed() is because user might not query for hasPulsed() every sample,
 	 * so we are safe so long as they call hasPulsed() or check() at least once per buffer.
 	 * Also, results are cached (i.e.: we do not check() for pulses twice for the same context.
-	 * context->audioSampleCount is used as an identifier.
+	 * context->audioFramesElapsed is used as an identifier.
 	 */
 	void check(BelaContext* context);
 
@@ -58,7 +58,7 @@
 	 * @return the length of the pulse if a pulse ending was detected at sample n, zero otherwise.
 	 */
 	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
+		if(_lastContext != context->audioFramesElapsed){ // check for pulses in the whole context and cache the result
 			check(context);
 		}
 		return _array[frame];