commit e3dc53122bc55c61fd0b8778061fb2783abc3c50
parent 67c31f76ac368bfad1e1c76065a48582fe8da08a
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sun, 22 Mar 2015 22:33:47 -0400
Add Namespaces To Rtosc Ports Instances
This eliminates some ambiguity with stoat
Diffstat:
7 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -202,7 +202,6 @@ endif()
include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS})
add_definitions(
- -g #TODO #todo put in a better location
-Wall
-Wextra
)
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
@@ -99,7 +99,7 @@ static Ports sysefsendto =
}}
};
-static Ports localports = {
+Ports Master::ports = {
rRecursp(part, 16, "Part"),//NUM_MIDI_PARTS
rRecursp(sysefx, 4, "System Effect"),//NUM_SYS_EFX
rRecursp(insefx, 8, "Insertion Effect"),//NUM_INS_EFX
@@ -211,8 +211,6 @@ static Ports localports = {
};
-
-Ports &Master::ports = localports;
Master *the_master;
class DataObj:public rtosc::RtData
diff --git a/src/Misc/Master.h b/src/Misc/Master.h
@@ -26,6 +26,7 @@
#include "../globals.h"
#include "Microtonal.h"
#include <rtosc/miditable.h>
+#include <rtosc/ports.h>
#include "Bank.h"
#include "Recorder.h"
@@ -155,7 +156,7 @@ class Master
class FFTwrapper * fft;
- static rtosc::Ports &ports;
+ static rtosc::Ports ports;
float volume;
//Statistics on output levels
diff --git a/src/Nio/OutMgr.h b/src/Nio/OutMgr.h
@@ -15,7 +15,7 @@ class OutMgr
~OutMgr();
/**Execute a tick*/
- const Stereo<float *> tick(unsigned int frameSize);
+ const Stereo<float *> tick(unsigned int frameSize) __attribute__((annotate("realtime")));
/**Request a new set of samples
* @param n number of requested samples (defaults to 1)
diff --git a/src/Synth/OscilGen.cpp b/src/Synth/OscilGen.cpp
@@ -41,7 +41,7 @@ pthread_t main_thread;
#define PC(x) rParamZyn(P##x, "undocumented oscilgen parameter")
#define rObject OscilGen
-static rtosc::Ports localPorts = {
+rtosc::Ports OscilGen::ports = {
rSelf(OscilGen),
rPaste(),
PC(hmagtype),
@@ -165,8 +165,6 @@ static rtosc::Ports localPorts = {
}},
};
-rtosc::Ports &OscilGen::ports = localPorts;
-
//operations on FFTfreqs
inline void clearAll(fft_t *freqs)
diff --git a/src/Synth/OscilGen.h b/src/Synth/OscilGen.h
@@ -24,6 +24,7 @@
#define OSCIL_GEN_H
#include "../globals.h"
+#include <rtosc/ports.h>
#include "../Params/Presets.h"
class OscilGen:public Presets
@@ -113,7 +114,7 @@ class OscilGen:public Presets
bool ADvsPAD; //if it is used by ADsynth or by PADsynth
- static rtosc::Ports &ports;
+ static rtosc::Ports ports;
/* Oscillator Frequencies -
* this is different than the hamonics set-up by the user,
diff --git a/src/UI/Connection.cpp b/src/UI/Connection.cpp
@@ -130,8 +130,12 @@ void GUI::destroyUi(ui_handle_t ui)
#define END }},
+struct uiPorts {
+ static rtosc::Ports ports;
+};
+
//DSL based ports
-static rtosc::Ports ports = {
+rtosc::Ports uiPorts::ports = {
BEGIN("show:T") {
ui->showUI();
} END
@@ -181,7 +185,7 @@ void GUI::raiseUi(ui_handle_t gui, const char *message)
d.loc = buffer;
d.loc_size = 1024;
d.obj = gui;
- ports.dispatch(message+1, d);
+ uiPorts::ports.dispatch(message+1, d);
}
void GUI::raiseUi(ui_handle_t gui, const char *dest, const char *args, ...)