diff core/default_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 b89dd0c97a04
children
line wrap: on
line diff
--- a/core/default_main.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/core/default_main.cpp	Fri May 27 14:34:41 2016 +0100
@@ -10,7 +10,7 @@
 #include <libgen.h>
 #include <signal.h>
 #include <getopt.h>
-#include "../include/BeagleRT.h"
+#include "../include/Bela.h"
 
 using namespace std;
 
@@ -25,14 +25,14 @@
 {
 	cerr << "Usage: " << processName << " [options]" << endl;
 
-	BeagleRT_usage();
+	Bela_usage();
 
 	cerr << "   --help [-h]:                Print this menu\n";
 }
 
 int main(int argc, char *argv[])
 {
-	BeagleRTInitSettings settings;	// Standard audio settings
+	BelaInitSettings settings;	// Standard audio settings
 
 	struct option customOptions[] =
 	{
@@ -41,12 +41,12 @@
 	};
 
 	// Set default settings
-	BeagleRT_defaultSettings(&settings);
+	Bela_defaultSettings(&settings);
 
 	// Parse command-line arguments
 	while (1) {
 		int c;
-		if ((c = BeagleRT_getopt_long(argc, argv, "h", customOptions, &settings)) < 0)
+		if ((c = Bela_getopt_long(argc, argv, "h", customOptions, &settings)) < 0)
 				break;
 		switch (c) {
 		case 'h':
@@ -60,13 +60,13 @@
 	}
 
 	// Initialise the PRU audio device
-	if(BeagleRT_initAudio(&settings, 0) != 0) {
+	if(Bela_initAudio(&settings, 0) != 0) {
 		cout << "Error: unable to initialise audio" << endl;
 		return -1;
 	}
 
 	// Start the audio device running
-	if(BeagleRT_startAudio()) {
+	if(Bela_startAudio()) {
 		cout << "Error: unable to start real-time audio" << endl;
 		return -1;
 	}
@@ -81,10 +81,10 @@
 	}
 
 	// Stop the audio device
-	BeagleRT_stopAudio();
+	Bela_stopAudio();
 
 	// Clean up any resources allocated for audio
-	BeagleRT_cleanupAudio();
+	Bela_cleanupAudio();
 
 	// All done!
 	return 0;