diff core/RTAudio.cpp @ 175:9bfe04d184fb experimental-fixing-AuxiliaryTask

Demonstrates issue #1374
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 28 Dec 2015 15:00:34 +0100
parents 1e629f126322
children
line wrap: on
line diff
--- a/core/RTAudio.cpp	Mon Dec 28 13:53:11 2015 +0100
+++ b/core/RTAudio.cpp	Mon Dec 28 15:00:34 2015 +0100
@@ -60,6 +60,16 @@
 
 vector<InternalAuxiliaryTask*> gAuxTasks;
 
+void dumpAuxTasks(){
+	printf("Aux tasks:\n");
+	printf("size: %d\n", gAuxTasks.size());
+	vector<InternalAuxiliaryTask*>::iterator it;
+	for(it = gAuxTasks.begin(); it != gAuxTasks.end(); it++) {
+		InternalAuxiliaryTask* task = *it;
+		printf("[%d] Name: %s\n", it-gAuxTasks.begin(), task->name);
+	}
+	printf("----------\n\n");
+}
 // Flag which tells the audio task to stop
 bool gShouldStop = false;
 
@@ -89,6 +99,8 @@
 
 int BeagleRT_initAudio(BeagleRTInitSettings *settings, void *userData)
 {
+	printf("initaudio\n");
+	dumpAuxTasks();
 	rt_print_auto_init(1);
 
 	BeagleRT_setVerboseLevel(settings->verbose);
@@ -439,6 +451,7 @@
 		free(taskStruct);
 	}
 	gAuxTasks.clear();
+	printf("CLEARED_-------------------------------------\n");
 
 	// Delete the audio task and its interrupt
 #ifdef BEAGLERT_USE_XENOMAI_INTERRUPTS