comparison core/ReceiveAudioThread.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 cb47043c8c28
children
comparison
equal deleted inserted replaced
300:dbeed520b014 301:e4392164b458
16 void ReceiveAudioThread::staticConstructor(){ 16 void ReceiveAudioThread::staticConstructor(){
17 if(staticConstructed==true) 17 if(staticConstructed==true)
18 return; 18 return;
19 staticConstructed=true; 19 staticConstructed=true;
20 threadIsExiting=false; 20 threadIsExiting=false;
21 receiveDataTask=BeagleRT_createAuxiliaryTask(receiveData, 90, "receiveDataTask"); //TODO: allow different priorities 21 receiveDataTask=Bela_createAuxiliaryTask(receiveData, 90, "receiveDataTask"); //TODO: allow different priorities
22 } 22 }
23 #endif /* USE_JUCE */ 23 #endif /* USE_JUCE */
24 24
25 void ReceiveAudioThread::dealloc(){ 25 void ReceiveAudioThread::dealloc(){
26 free(buffer); 26 free(buffer);
247 return bufferReady; 247 return bufferReady;
248 } 248 }
249 #ifdef USE_JUCE 249 #ifdef USE_JUCE
250 #else 250 #else
251 void ReceiveAudioThread::startThread(){ 251 void ReceiveAudioThread::startThread(){
252 BeagleRT_scheduleAuxiliaryTask(receiveDataTask); 252 Bela_scheduleAuxiliaryTask(receiveDataTask);
253 } 253 }
254 void ReceiveAudioThread::stopThread(){ 254 void ReceiveAudioThread::stopThread(){
255 threadIsExiting=true; 255 threadIsExiting=true;
256 } 256 }
257 bool ReceiveAudioThread::threadShouldExit(){ 257 bool ReceiveAudioThread::threadShouldExit(){
270 threadRunning=true; 270 threadRunning=true;
271 int maxCount=10; 271 int maxCount=10;
272 int count=0; 272 int count=0;
273 // Clean the socket from anything that is currently in it. 273 // Clean the socket from anything that is currently in it.
274 #ifdef USE_JUCE 274 #ifdef USE_JUCE
275 // this is borrowed from BeagleRT's UdpServer class. 275 // this is borrowed from Bela's UdpServer class.
276 int n; 276 int n;
277 do { 277 do {
278 float waste; 278 float waste;
279 if(socket.waitUntilReady(true, 0)==0) 279 if(socket.waitUntilReady(true, 0)==0)
280 break; 280 break;