comparison core/RTAudio.cpp @ 24:ad5cd8dd99b3 bbb_network

UDP communication in place, pre-alpha
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 08 May 2015 11:12:13 +0100
parents c98863e63174
children 4255ecbb9bec 579c86316008
comparison
equal deleted inserted replaced
23:182ae9367104 24:ad5cd8dd99b3
29 #include "../include/RTAudio.h" 29 #include "../include/RTAudio.h"
30 #include "../include/PRU.h" 30 #include "../include/PRU.h"
31 #include "../include/I2c_Codec.h" 31 #include "../include/I2c_Codec.h"
32 #include "../include/render.h" 32 #include "../include/render.h"
33 #include "../include/GPIOcontrol.h" 33 #include "../include/GPIOcontrol.h"
34 #include "../include/client.h"
34 35
35 using namespace std; 36 using namespace std;
36 37
37 // Data structure to keep track of auxiliary tasks we 38 // Data structure to keep track of auxiliary tasks we
38 // can schedule 39 // can schedule
79 // userData is an opaque pointer which will be passed through to the initialise_render() 80 // userData is an opaque pointer which will be passed through to the initialise_render()
80 // function for application-specific use 81 // function for application-specific use
81 // 82 //
82 // Returns 0 on success. 83 // Returns 0 on success.
83 84
85
84 int BeagleRT_initAudio(RTAudioSettings *settings, void *userData) 86 int BeagleRT_initAudio(RTAudioSettings *settings, void *userData)
85 { 87 {
86 rt_print_auto_init(1); 88 rt_print_auto_init(1);
87 setVerboseLevel(settings->verbose); 89 setVerboseLevel(settings->verbose);
88 gPRUFilename=settings->pruFilename; 90 gPRUFilename=settings->pruFilename;
182 gNumAnalogChannels = settings->useAnalog ? settings->numAnalogChannels : 0; 184 gNumAnalogChannels = settings->useAnalog ? settings->numAnalogChannels : 0;
183 if(!initialise_render(gNumAnalogChannels, gNumDigitalChannels, gNumAudioChannels, 185 if(!initialise_render(gNumAnalogChannels, gNumDigitalChannels, gNumAudioChannels,
184 settings->useAnalog ? settings->periodSize : 0, /* analog period size */ 186 settings->useAnalog ? settings->periodSize : 0, /* analog period size */
185 audioPeriodSize, 187 audioPeriodSize,
186 analogSampleRate, audioSampleRate, 188 analogSampleRate, audioSampleRate,
187 userData)) { 189 userData, settings)) {
188 cout << "Couldn't initialise audio rendering\n"; 190 cout << "Couldn't initialise audio rendering\n";
189 return 1; 191 return 1;
190 } 192 }
191 193
192 return 0; 194 return 0;