diff projects/scope/render.cpp @ 151:e9c9404e3d1f ClockSync

Pff partially working. No PID. When setting the audio clock on the bbb to 44098 the master and slave clock keep diverging instead of converging ...
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 22 Sep 2015 04:10:07 +0100
parents 134bff10e561
children 8f98b32d0e23
line wrap: on
line diff
--- a/projects/scope/render.cpp	Tue Sep 22 04:09:13 2015 +0100
+++ b/projects/scope/render.cpp	Tue Sep 22 04:10:07 2015 +0100
@@ -76,6 +76,27 @@
 //		BeagleRT_scheduleAuxiliaryTask(testTime);
 		clockSyncThread.startThread(); //make sure you uncomment .init in setup()
 	}
+	/*
+	switch (count){
+	case 5000:
+			gAudioCodec->setAudioSamplingRate(44101);
+			printf("0 0 0\n");
+			break;
+	case 10000:
+			gAudioCodec->setAudioSamplingRate(44100);
+			printf("0 0 0\n");
+			break;
+	case 15000:
+			gAudioCodec->setAudioSamplingRate(44099);
+			printf("0 0 0\n");
+			break;
+	case 20000:
+			gAudioCodec->setAudioSamplingRate(44100);
+			printf("0 0 0\n");
+			count = 0;
+			break;
+	}
+	*/
 	static float phase=0;
 	float phaseInc=gFrequency1/44100.0*2*M_PI;
 //	rt_printf("phaseInc: %f, phase: %f\n",phaseInc,phase);