diff core/PulseIn.cpp @ 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 02c4ca0e3718
children
line wrap: on
line diff
--- a/core/PulseIn.cpp	Fri May 27 18:29:20 2016 +0100
+++ b/core/PulseIn.cpp	Fri May 27 18:37:51 2016 +0100
@@ -26,17 +26,17 @@
 	for(unsigned int n = 0; n < context->digitalFrames; n++){
 		if(_pulseIsOn == false){ // look for start edge
 			if(digitalRead(context, n, _digitalInput) == _pulseOnState){
-				_pulseStart = context->audioSampleCount + n; // store location of start edge
+				_pulseStart = context->audioFramesElapsed + n; // store location of start edge
 				_pulseIsOn = true;
 			}
 		} else { // _pulseIsOn == true;
 			if(digitalRead(context, n, _digitalInput) == !_pulseOnState){ // look for stop edge
-				_array[n] = context->audioSampleCount + n - _pulseStart; // compute and store pulse duration
+				_array[n] = context->audioFramesElapsed + n - _pulseStart; // compute and store pulse duration
 				_pulseIsOn = false;
 			}
 		}
 	}
-	_lastContext = context->audioSampleCount;
+	_lastContext = context->audioFramesElapsed;
 };
 
 PulseIn::~PulseIn() {