diff examples/basic_midi/render.cpp @ 314:611306d840b3 prerelease

Merge
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 27 May 2016 19:00:43 +0100
parents 1feb9c23ac57
children 9dc5a0ccad25
line wrap: on
line diff
--- a/examples/basic_midi/render.cpp	Fri May 27 18:55:34 2016 +0100
+++ b/examples/basic_midi/render.cpp	Fri May 27 19:00:43 2016 +0100
@@ -133,7 +133,7 @@
 	for(unsigned int n = 0; n < context->analogFrames; n++){
 		static int count = 0;
 		static bool state = 0;
-		analogWriteFrameOnce(context, n, 1, state);
+		analogWriteOnce(context, n, 1, state);
 		if(count % 40000 == 0){
 			state = !state;
 			midi_byte_t bytes[6] = {176, 30, (char)(state*127), 176, 67, 30}; // toggle the OWL led and ask for the led status
@@ -148,11 +148,11 @@
 			if(phase > 2 * M_PI)
 				phase -= 2 * M_PI;
 			float value = sinf(phase) * gVelocity/128.0f;
-			audioWriteFrame(context, n, 0, value);
-			audioWriteFrame(context, n, 1, value);
+			audioWrite(context, n, 0, value);
+			audioWrite(context, n, 1, value);
 		} else {
-			audioWriteFrame(context, n, 0, 0);
-			audioWriteFrame(context, n, 1, 0);
+			audioWrite(context, n, 0, 0);
+			audioWrite(context, n, 1, 0);
 		}
 	}
 }