diff examples/filter_IIR/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
line wrap: on
line diff
--- a/examples/filter_IIR/main.cpp	Fri May 27 13:58:20 2016 +0100
+++ b/examples/filter_IIR/main.cpp	Fri May 27 14:34:41 2016 +0100
@@ -13,7 +13,7 @@
 #include <getopt.h>
 #include <sndfile.h>				// to load audio files
 
-#include <BeagleRT.h>
+#include <Bela.h>
 #include "SampleData.h"
 
 using namespace std;
@@ -84,7 +84,7 @@
 {
 	cerr << "Usage: " << processName << " [options]" << endl;
 
-	BeagleRT_usage();
+	Bela_usage();
 
 	cerr << "   --file [-f] filename:    Name of the file to load (default is \"longsample.wav\")\n";
 	cerr << "   --cutfreq [-c] freq:     Set the cut off frequency of the filter in Hz\n";
@@ -93,7 +93,7 @@
 
 int main(int argc, char *argv[])
 {
-	BeagleRTInitSettings settings;	// Standard audio settings
+	BelaInitSettings settings;	// Standard audio settings
 	string fileName;			// Name of the sample to load
 
 	SampleData sampleData;		// User define structure to pass data retrieved from file to render function
@@ -110,12 +110,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, "hf:c:", customOptions, &settings)) < 0)
+		if ((c = Bela_getopt_long(argc, argv, "hf:c:", customOptions, &settings)) < 0)
 				break;
 		switch (c) {
 		case 'h':
@@ -154,13 +154,13 @@
 
 
 	// Initialise the PRU audio device
-	if(BeagleRT_initAudio(&settings, &sampleData) != 0) {
+	if(Bela_initAudio(&settings, &sampleData) != 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;
 	}
@@ -175,10 +175,10 @@
 	}
 
 	// Stop the audio device
-	BeagleRT_stopAudio();
+	Bela_stopAudio();
 
 	// Clean up any resources allocated for audio
-	BeagleRT_cleanupAudio();
+	Bela_cleanupAudio();
 
 	// All done!
 	return 0;