diff projects/basic/render.cpp @ 13:6adb088196a7

Fixed ADC bug; added a simple passthrough test
author andrewm
date Fri, 23 Jan 2015 15:17:09 +0000
parents a6beeba3a648
children ad5cd8dd99b3
line wrap: on
line diff
--- a/projects/basic/render.cpp	Thu Jan 22 19:00:22 2015 +0000
+++ b/projects/basic/render.cpp	Fri Jan 23 15:17:09 2015 +0000
@@ -12,7 +12,6 @@
 float gFrequency;
 float gPhase;
 float gInverseSampleRate;
-int gNumChannels;
 
 // initialise_render() is called once before the audio rendering starts.
 // Use it to perform any initialisation and allocation which is dependent
@@ -32,7 +31,6 @@
 	// Retrieve a parameter passed in from the initAudio() call
 	gFrequency = *(float *)userData;
 
-	gNumChannels = numAudioChannels;
 	gInverseSampleRate = 1.0 / audioSampleRate;
 	gPhase = 0.0;
 
@@ -53,8 +51,8 @@
 		if(gPhase > 2.0 * M_PI)
 			gPhase -= 2.0 * M_PI;
 
-		for(int channel = 0; channel < gNumChannels; channel++)
-			audioOut[n * gNumChannels + channel] = out;
+		for(int channel = 0; channel < gNumAudioChannels; channel++)
+			audioOut[n * gNumAudioChannels + channel] = out;
 	}
 }