Mercurial > hg > beaglert
comparison projects/basic_network/main.cpp @ 56:3c3a1357657d newapi
Further API update to name three primary functions setup(), render() and cleanup(). Changed include paths so now can #include <BeagleRT.h>. Removed stale pru_rtaudio.bin file as this is now done as pru_rtaudio_bin.h. Updated examples to new API and fixed minor compiler warnings along the way. Network example needs further attention to compile.
author | andrewm |
---|---|
date | Wed, 15 Jul 2015 12:10:51 +0100 |
parents | ad5cd8dd99b3 |
children |
comparison
equal
deleted
inserted
replaced
55:41d24dba6b74 | 56:3c3a1357657d |
---|---|
8 #include <iostream> | 8 #include <iostream> |
9 #include <cstdlib> | 9 #include <cstdlib> |
10 #include <libgen.h> | 10 #include <libgen.h> |
11 #include <signal.h> | 11 #include <signal.h> |
12 #include <getopt.h> | 12 #include <getopt.h> |
13 #include "../../include/RTAudio.h" | |
14 #include <unistd.h> | 13 #include <unistd.h> |
14 #include <BeagleRT.h> | |
15 | 15 |
16 using namespace std; | 16 using namespace std; |
17 | 17 |
18 // Handle Ctrl-C by requesting that the audio rendering stop | 18 // Handle Ctrl-C by requesting that the audio rendering stop |
19 void interrupt_handler(int var) | 19 void interrupt_handler(int var) |
32 cerr << " --help [-h]: Print this menu\n"; | 32 cerr << " --help [-h]: Print this menu\n"; |
33 } | 33 } |
34 | 34 |
35 int main(int argc, char *argv[]) | 35 int main(int argc, char *argv[]) |
36 { | 36 { |
37 RTAudioSettings settings; // Standard audio settings | 37 BeagleRTInitSettings settings; // Standard audio settings |
38 float frequency = 440.0; // Frequency of oscillator | 38 float frequency = 440.0; // Frequency of oscillator |
39 | 39 |
40 struct option customOptions[] = | 40 struct option customOptions[] = |
41 { | 41 { |
42 {"help", 0, NULL, 'h'}, | 42 {"help", 0, NULL, 'h'}, |
43 {"frequency", 1, NULL, 'f'}, | 43 {"frequency", 1, NULL, 'f'}, |