Skip to content

Commit

Permalink
Bela: removed support for ancient Xenomai native skin
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Dec 25, 2020
1 parent adcaf80 commit 6f456c7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions server/scsynth/SC_Bela.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@
#include "SC_BelaScope.h"
#include <math.h>
#include <stdlib.h>

#ifdef XENOMAI_SKIN_native
# include <posix/time.h> // needed for CLOCK_HOST_REALTIME
#endif
#ifdef XENOMAI_SKIN_posix
# include <cobalt/time.h> // needed for CLOCK_HOST_REALTIME
#endif
#include <cobalt/time.h> // needed for CLOCK_HOST_REALTIME

extern "C" {
// This will be wrapped by Xenomai without requiring linker flags
Expand Down Expand Up @@ -164,7 +158,7 @@ void SC_BelaDriver::BelaAudioCallback(BelaContext* belaContext) {

// NOTE: code here is adapted from the SC_Jack.cpp, the version not using the DLL

// Use Xenomai-friendly clock_gettime() -- note that this requires a -wrap argument to build
// Use Xenomai-friendly clock_gettime()
__wrap_clock_gettime(CLOCK_HOST_REALTIME, &tspec);

double hostSecs = (double)tspec.tv_sec + (double)tspec.tv_nsec * 1.0e-9;
Expand Down Expand Up @@ -502,9 +496,6 @@ bool SC_BelaDriver::DriverSetup(int* outNumSamples, double* outSampleRate) {

bool SC_BelaDriver::DriverStart() {
SetPrintFunc((PrintFunc)rt_vprintf); // Use Xenomai's realtime-friendly printing function
#ifdef XENOMAI_SKIN_native
rt_print_auto_init(1); // Make sure the buffers for rt_vprintf are actually initialized.
#endif
if (Bela_startAudio()) {
scprintf("Error in SC_BelaDriver::DriverStart(): unable to start real-time audio\n");
return false;
Expand Down

0 comments on commit 6f456c7

Please sign in to comment.