Mercurial > hg > beaglert
diff core/RTAudio.cpp @ 307:ff5f346a293e prerelease
Changed BelaContext fields to be const where appropriate; there's now an InternalBelaContext used for setting the values within the core code. These need to stay aligned.
author | andrewm |
---|---|
date | Fri, 27 May 2016 18:12:15 +0100 |
parents | 421a69d42943 |
children | 3bed6b09223c |
line wrap: on
line diff
--- a/core/RTAudio.cpp Fri May 27 18:00:57 2016 +0100 +++ b/core/RTAudio.cpp Fri May 27 18:12:15 2016 +0100 @@ -51,14 +51,15 @@ bool autoSchedule; } InternalAuxiliaryTask; -const char gRTAudioThreadName[] = "bela-audio"; -const char gRTAudioInterruptName[] = "bela-pru-irq"; - // Real-time tasks and objects RT_TASK gRTAudioThread; +const char gRTAudioThreadName[] = "bela-audio"; + #ifdef BELA_USE_XENOMAI_INTERRUPTS RT_INTR gRTAudioInterrupt; +const char gRTAudioInterruptName[] = "bela-pru-irq"; #endif + PRU *gPRU = 0; I2c_Codec *gAudioCodec = 0; @@ -77,7 +78,7 @@ int gAmplifierShouldBeginMuted = 0; // Context which holds all the audio/sensor data passed to the render routines -BelaContext gContext; +InternalBelaContext gContext; // User data passed in from main() void *gUserData; @@ -244,7 +245,7 @@ Bela_setHeadphoneLevel(settings->headphoneLevel); // Call the user-defined initialisation function - if(!setup(&gContext, userData)) { + if(!setup((BelaContext *)&gContext, userData)) { cout << "Couldn't initialise audio rendering\n"; return 1; } @@ -485,7 +486,7 @@ // Free any resources associated with PRU real-time audio void Bela_cleanupAudio() { - cleanup(&gContext, gUserData); + cleanup((BelaContext *)&gContext, gUserData); // Clean up the auxiliary tasks vector<InternalAuxiliaryTask*>::iterator it;