comparison projects/basic/main.cpp @ 45:579c86316008 newapi

Major API overhaul. Moved to a single data structure for handling render functions. Functionally, generally similar except for scheduling within PRU loop function, which now uses interrupts from the PRU rather than polling. This requires an updated kernel.
author andrewm
date Thu, 28 May 2015 14:35:55 -0400
parents ad5cd8dd99b3
children 3c3a1357657d
comparison
equal deleted inserted replaced
40:419ce4ebfc4c 45:579c86316008
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" 13 #include "../../include/BeagleRT.h"
14 14
15 using namespace std; 15 using namespace std;
16 16
17 // Handle Ctrl-C by requesting that the audio rendering stop 17 // Handle Ctrl-C by requesting that the audio rendering stop
18 void interrupt_handler(int var) 18 void interrupt_handler(int var)
31 cerr << " --help [-h]: Print this menu\n"; 31 cerr << " --help [-h]: Print this menu\n";
32 } 32 }
33 33
34 int main(int argc, char *argv[]) 34 int main(int argc, char *argv[])
35 { 35 {
36 RTAudioSettings settings; // Standard audio settings 36 BeagleRTInitSettings settings; // Standard audio settings
37 float frequency = 440.0; // Frequency of oscillator 37 float frequency = 440.0; // Frequency of oscillator
38 38
39 struct option customOptions[] = 39 struct option customOptions[] =
40 { 40 {
41 {"help", 0, NULL, 'h'}, 41 {"help", 0, NULL, 'h'},