Last active
February 28, 2024 09:17
-
-
Save jarmitage/7f918076a6aa6673f3410fdb14423e22 to your computer and use it in GitHub Desktop.
Bela auxiliary task pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Bela.h> | |
AuxiliaryTask myTask; | |
void myTaskProcess (void*); | |
bool setup(BelaContext *context, void *userData) | |
{ | |
myTask = Bela_createAuxiliaryTask(myTaskProcess, 50, "bela-task"); | |
return true; | |
} | |
void render(BelaContext *context, void *userData) | |
{ | |
Bela_scheduleAuxiliaryTask (myTask); | |
} | |
void myTaskProcess (void*) | |
{ | |
// do stuff... | |
} | |
void cleanup(BelaContext *context, void *userData) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment