diff examples/d-box/main.cpp @ 301:e4392164b458 prerelease

RENAMED BeagleRT to Bela AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, scripts probably not working
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 27 May 2016 14:34:41 +0100
parents dbeed520b014
children 421a69d42943
line wrap: on
line diff
--- a/examples/d-box/main.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/examples/d-box/main.cpp	Fri May 27 14:34:41 2016 +0100
@@ -33,7 +33,7 @@
 // get_opt_long
 #include <getopt.h>
 
-#include <BeagleRT.h>
+#include <Bela.h>
 #include "config.h"
 #include "sensors.h"
 #include "OscillatorBank.h"
@@ -262,7 +262,7 @@
 }
 
 
-void parseArguments(arg_data args, BeagleRTInitSettings *settings)
+void parseArguments(arg_data args, BelaInitSettings *settings)
 {
 	// Default filename;
 	gPartialFilename = strdup("D-Box_sound_250_60_40_h88_2.txt");
@@ -290,12 +290,12 @@
 	int morehelp = 0;
 	int tmp = -1;
 
-	BeagleRT_defaultSettings(settings);
+	Bela_defaultSettings(settings);
 
 	while (1)
 	{
 		int c;
-		if ((c = BeagleRT_getopt_long(args.argc, args.argv, "hf:ki:sq:r:t:l:u:o:n:g:", long_option, settings)) < 0)
+		if ((c = Bela_getopt_long(args.argc, args.argv, "hf:ki:sq:r:t:l:u:o:n:g:", long_option, settings)) < 0)
 				break;
 		switch (c)
 		{
@@ -363,7 +363,7 @@
 
 int main(int argc, char *argv[])
 {
-	BeagleRTInitSettings settings;	// Standard audio settings
+	BelaInitSettings settings;	// Standard audio settings
 	RT_TASK rtSensorThread;
 	const char rtSensorThreadName[] = "dbox-sensor";
 	int oscBankHopSize;
@@ -373,7 +373,7 @@
 	args.argv = argv;
 	parseArguments(args, &settings);
 
-	BeagleRT_setVerboseLevel(gVerbose);
+	Bela_setVerboseLevel(gVerbose);
 	if(gVerbose == 1 && useAudioTest)
 		cout << "main() : running in audio test mode" << endl;
 
@@ -384,7 +384,7 @@
 	oscBankHopSize = gOscBanks[gCurrentOscBank]->getHopSize()/gOscBanks[gCurrentOscBank]->getMinSpeed();
 
 	// Initialise the audio device
-	if(BeagleRT_initAudio(&settings, &oscBankHopSize) != 0)
+	if(Bela_initAudio(&settings, &oscBankHopSize) != 0)
 		return -1;
 
 	// Initialise the status LED
@@ -405,7 +405,7 @@
 	if(gVerbose == 1)
 		cout << "main() : creating audio thread" << endl;
 
-	if(BeagleRT_startAudio()) {
+	if(Bela_startAudio()) {
 		cout << "Error: unable to start real-time audio" << endl;
 		return -1;
 	}
@@ -466,12 +466,12 @@
 		usleep(100000);
 	}
 
-	BeagleRT_stopAudio();
+	Bela_stopAudio();
 
 	if(!useAudioTest)
 		rt_task_join(&rtSensorThread);
 
-	BeagleRT_cleanupAudio();
+	Bela_cleanupAudio();
 
 	pthread_join( keyboardThread, NULL);
 	pthread_join( logThread, NULL);