commit 3c91f4918a706844d0ff5348b19b86cdbeb4d204
parent 601fc9c372c1ab27705b4ec33ed1459205d4935c
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Mon, 1 Sep 2014 01:45:31 -0400
Adding Some Sparse RT Annotations For Stoat
Diffstat:
5 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/src/Effects/EffectMgr.h b/src/Effects/EffectMgr.h
@@ -47,24 +47,24 @@ class EffectMgr:public Presets
~EffectMgr();
void add2XML(XMLwrapper *xml);
- void defaults(void);
+ void defaults(void) REALTIME;
void getfromXML(XMLwrapper *xml);
- void out(float *smpsl, float *smpsr);
+ void out(float *smpsl, float *smpsr) REALTIME;
void setdryonly(bool value);
/**get the output(to speakers) volume of the systemeffect*/
float sysefxgetvolume(void);
- void cleanup(void);
+ void cleanup(void) REALTIME;
void changeeffect(int nefx_);
int geteffect(void);
- void changepreset(unsigned char npreset);
+ void changepreset(unsigned char npreset) REALTIME;
void changepreset_nolock(unsigned char npreset);
unsigned char getpreset(void);
- void seteffectpar(int npar, unsigned char value);
+ void seteffectpar(int npar, unsigned char value) REALTIME;
void seteffectpar_nolock(int npar, unsigned char value);
unsigned char geteffectpar(int npar);
diff --git a/src/Misc/Bank.h b/src/Misc/Bank.h
@@ -25,6 +25,7 @@
#include <string>
#include <vector>
+#include "../globals.h"
//entries in a bank
#define BANK_SIZE 160
@@ -56,8 +57,8 @@ class Bank
/**Swaps Slots*/
void swapslot(unsigned int n1, unsigned int n2);
- int loadbank(std::string bankdirname);
- int newbank(std::string newbankdirname);
+ int loadbank(std::string bankdirname) NONREALTIME;
+ int newbank(std::string newbankdirname) NONREALTIME;
std::string bankfiletitle; //this is shown on the UI of the bank (the title of the window)
int locked();
diff --git a/src/Misc/Master.h b/src/Misc/Master.h
@@ -98,12 +98,12 @@ class Master
void vuUpdate(const float *outl, const float *outr);
/**Audio Output*/
- void AudioOut(float *outl, float *outr);
+ void AudioOut(float *outl, float *outr) REALTIME;
/**Audio Output (for callback mode). This allows the program to be controled by an external program*/
void GetAudioOutSamples(size_t nsamples,
unsigned samplerate,
float *outl,
- float *outr);
+ float *outr) REALTIME;
void partonoff(int npart, int what);
diff --git a/src/Misc/Part.h b/src/Misc/Part.h
@@ -53,23 +53,23 @@ class Part
~Part();
// Copy misc parameters not stored in .xiz format
- void cloneTraits(Part &part) const;
+ void cloneTraits(Part &part) const REALTIME;
// Midi commands implemented
void NoteOn(unsigned char note,
unsigned char velocity,
- int masterkeyshift);
- void NoteOff(unsigned char note);
+ int masterkeyshift) REALTIME;
+ void NoteOff(unsigned char note) REALTIME;
void PolyphonicAftertouch(unsigned char note,
unsigned char velocity,
- int masterkeyshift);
- void AllNotesOff(); //panic
- void SetController(unsigned int type, int par);
- void RelaseSustainedKeys(); //this is called when the sustain pedal is relased
- void RelaseAllKeys(); //this is called on AllNotesOff controller
+ int masterkeyshift) REALTIME;
+ void AllNotesOff() REALTIME; //panic
+ void SetController(unsigned int type, int par) REALTIME;
+ void RelaseSustainedKeys() REALTIME; //this is called when the sustain pedal is relased
+ void RelaseAllKeys() REALTIME; //this is called on AllNotesOff controller
/* The synthesizer part output */
- void ComputePartSmps(); //Part output
+ void ComputePartSmps() REALTIME; //Part output
//saves the instrument settings to a XML file
diff --git a/src/globals.h b/src/globals.h
@@ -26,6 +26,14 @@
#define GLOBALS_H
#include <stdint.h>
+#if defined(__clang__)
+#define REALTIME __attribute__((annotate("realtime")))
+#define NONREALTIME __attribute__((annotate("nonrealtime")))
+#else
+#define REALTIME
+#define NONREALTIME
+#endif
+
//Forward declarations
namespace rtosc{struct Ports; class ThreadLink;};
extern rtosc::ThreadLink *bToU;