summaryrefslogtreecommitdiff
path: root/muse2/synti/libsynti
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
commita347445db32f51562aee5c6a786c312d1f612d2f (patch)
treeba3dc9a6e03eec2edf2c213b7f4d7e5e49903edc /muse2/synti/libsynti
parent375d6a53630f364c6560eb40255a8cc4c0496b8c (diff)
parent5367067f7a36dce8a362dcc000d41ac581bffdfe (diff)
merged namespace changes. HOPEFULLY the last one.
Diffstat (limited to 'muse2/synti/libsynti')
-rw-r--r--muse2/synti/libsynti/gui.cpp16
-rw-r--r--muse2/synti/libsynti/gui.h12
-rw-r--r--muse2/synti/libsynti/mess.cpp22
-rw-r--r--muse2/synti/libsynti/mess.h6
-rw-r--r--muse2/synti/libsynti/poly.cpp4
5 files changed, 30 insertions, 30 deletions
diff --git a/muse2/synti/libsynti/gui.cpp b/muse2/synti/libsynti/gui.cpp
index 194e186a..92935ae2 100644
--- a/muse2/synti/libsynti/gui.cpp
+++ b/muse2/synti/libsynti/gui.cpp
@@ -78,7 +78,7 @@ void MessGui::readMessage()
// sendEvent
//---------------------------------------------------------
-void MessGui::sendEvent(const MidiPlayEvent& ev)
+void MessGui::sendEvent(const MusECore::MidiPlayEvent& ev)
{
if (wFifoSize == EVENT_FIFO_SIZE) {
printf("event gui->synti fifo overflow\n");
@@ -95,10 +95,10 @@ void MessGui::sendEvent(const MidiPlayEvent& ev)
void MessGui::sendController(int ch, int idx, int val)
{
-// MidiPlayEvent pe(0, 0, ch, ME_CONTROLLER, idx, val);
+// MusECore::MidiPlayEvent pe(0, 0, ch, MusECore::ME_CONTROLLER, idx, val);
// sendEvent(pe);
- sendEvent(MidiPlayEvent(0, 0, ch, ME_CONTROLLER, idx, val));
+ sendEvent(MusECore::MidiPlayEvent(0, 0, ch, MusECore::ME_CONTROLLER, idx, val));
}
//---------------------------------------------------------
@@ -107,10 +107,10 @@ void MessGui::sendController(int ch, int idx, int val)
void MessGui::sendSysex(unsigned char* p, int n)
{
-// MidiPlayEvent pe(0, 0, ME_SYSEX, p, n);
+// MusECore::MidiPlayEvent pe(0, 0, MusECore::ME_SYSEX, p, n);
// sendEvent(pe);
- sendEvent(MidiPlayEvent(0, 0, ME_SYSEX, p, n));
+ sendEvent(MusECore::MidiPlayEvent(0, 0, MusECore::ME_SYSEX, p, n));
}
//---------------------------------------------------------
@@ -118,7 +118,7 @@ void MessGui::sendSysex(unsigned char* p, int n)
// send an event to synti gui
//---------------------------------------------------------
-void MessGui::writeEvent(const MidiPlayEvent& ev)
+void MessGui::writeEvent(const MusECore::MidiPlayEvent& ev)
{
if (rFifoSize == EVENT_FIFO_SIZE) {
printf("event synti->gui fifo overflow\n");
@@ -135,9 +135,9 @@ void MessGui::writeEvent(const MidiPlayEvent& ev)
// read event from synti gui
//---------------------------------------------------------
-MidiPlayEvent MessGui::readEvent()
+MusECore::MidiPlayEvent MessGui::readEvent()
{
- MidiPlayEvent ev = wFifo[wFifoRindex];
+ MusECore::MidiPlayEvent ev = wFifo[wFifoRindex];
wFifoRindex = (wFifoRindex + 1) % EVENT_FIFO_SIZE;
--wFifoSize;
return ev;
diff --git a/muse2/synti/libsynti/gui.h b/muse2/synti/libsynti/gui.h
index 96ac907f..1fda6c26 100644
--- a/muse2/synti/libsynti/gui.h
+++ b/muse2/synti/libsynti/gui.h
@@ -39,13 +39,13 @@ class MessGui {
int writeFd;
// Event Fifo synti -> GUI
- MidiPlayEvent rFifo[EVENT_FIFO_SIZE];
+ MusECore::MidiPlayEvent rFifo[EVENT_FIFO_SIZE];
volatile int rFifoSize;
int rFifoWindex;
int rFifoRindex;
// Event Fifo GUI -> synti
- MidiPlayEvent wFifo[EVENT_FIFO_SIZE];
+ MusECore::MidiPlayEvent wFifo[EVENT_FIFO_SIZE];
volatile int wFifoSize;
int wFifoWindex;
int wFifoRindex;
@@ -53,19 +53,19 @@ class MessGui {
protected:
int readFd;
void readMessage();
- void sendEvent(const MidiPlayEvent& ev);
+ void sendEvent(const MusECore::MidiPlayEvent& ev);
void sendController(int,int,int);
void sendSysex(unsigned char*, int);
- virtual void processEvent(const MidiPlayEvent&) {};
+ virtual void processEvent(const MusECore::MidiPlayEvent&) {};
public:
MessGui();
virtual ~MessGui();
- void writeEvent(const MidiPlayEvent&);
+ void writeEvent(const MusECore::MidiPlayEvent&);
int fifoSize() const { return wFifoSize; }
- MidiPlayEvent readEvent();
+ MusECore::MidiPlayEvent readEvent();
};
//---------------------------------------------------------
diff --git a/muse2/synti/libsynti/mess.cpp b/muse2/synti/libsynti/mess.cpp
index 62a281e1..027a30c1 100644
--- a/muse2/synti/libsynti/mess.cpp
+++ b/muse2/synti/libsynti/mess.cpp
@@ -32,7 +32,7 @@ static const int FIFO_SIZE = 32;
struct MessP {
// Event Fifo synti -> Host:
- MidiPlayEvent fifo[FIFO_SIZE];
+ MusECore::MidiPlayEvent fifo[FIFO_SIZE];
volatile int fifoSize;
int fifoWindex;
int fifoRindex;
@@ -92,7 +92,7 @@ void Mess::getNativeGeometry(int* x, int* y, int* w, int* h) const
// send Event synti -> host
//---------------------------------------------------------
-void Mess::sendEvent(MidiPlayEvent ev)
+void Mess::sendEvent(MusECore::MidiPlayEvent ev)
{
if (d->fifoSize == FIFO_SIZE) {
printf("event synti->host fifo overflow\n");
@@ -108,9 +108,9 @@ void Mess::sendEvent(MidiPlayEvent ev)
// called from host
//---------------------------------------------------------
-MidiPlayEvent Mess::receiveEvent()
+MusECore::MidiPlayEvent Mess::receiveEvent()
{
- MidiPlayEvent ev = d->fifo[d->fifoRindex];
+ MusECore::MidiPlayEvent ev = d->fifo[d->fifoRindex];
d->fifoRindex = (d->fifoRindex + 1) % FIFO_SIZE;
--(d->fifoSize);
return ev;
@@ -134,19 +134,19 @@ int Mess::eventsPending() const
// return true if synti is busy
//---------------------------------------------------------
-bool Mess::processEvent(const MidiPlayEvent& ev)
+bool Mess::processEvent(const MusECore::MidiPlayEvent& ev)
{
switch(ev.type()) {
- case ME_NOTEON:
+ case MusECore::ME_NOTEON:
return playNote(ev.channel(), ev.dataA(), ev.dataB());
- case ME_NOTEOFF:
+ case MusECore::ME_NOTEOFF:
return playNote(ev.channel(), ev.dataA(), 0);
- case ME_SYSEX:
+ case MusECore::ME_SYSEX:
return sysex(ev.len(), ev.data());
- case ME_CONTROLLER:
+ case MusECore::ME_CONTROLLER:
return setController(ev.channel(), ev.dataA(), ev.dataB());
- case ME_PITCHBEND: // Tim.
- return setController(ev.channel(), CTRL_PITCH, ev.dataA());
+ case MusECore::ME_PITCHBEND: // Tim.
+ return setController(ev.channel(), MusECore::CTRL_PITCH, ev.dataA());
}
return false;
}
diff --git a/muse2/synti/libsynti/mess.h b/muse2/synti/libsynti/mess.h
index 65f30e26..f9853330 100644
--- a/muse2/synti/libsynti/mess.h
+++ b/muse2/synti/libsynti/mess.h
@@ -81,7 +81,7 @@ class Mess {
// the synti has to (re-)implement processEvent() or provide
// some of the next three functions:
- virtual bool processEvent(const MidiPlayEvent&);
+ virtual bool processEvent(const MusECore::MidiPlayEvent&);
virtual bool setController(int, int, int) { return false; }
virtual bool playNote(int, int, int) { return false; }
virtual bool sysex(int, const unsigned char*) { return false; }
@@ -92,8 +92,8 @@ class Mess {
virtual const MidiPatch* getPatchInfo(int, const MidiPatch*) const { return 0; }
// synthesizer -> host communication
- void sendEvent(MidiPlayEvent); // called from synti
- MidiPlayEvent receiveEvent(); // called from host
+ void sendEvent(MusECore::MidiPlayEvent); // called from synti
+ MusECore::MidiPlayEvent receiveEvent(); // called from host
int eventsPending() const;
// GUI interface routines
diff --git a/muse2/synti/libsynti/poly.cpp b/muse2/synti/libsynti/poly.cpp
index 1dec00fd..e76dfc6b 100644
--- a/muse2/synti/libsynti/poly.cpp
+++ b/muse2/synti/libsynti/poly.cpp
@@ -41,8 +41,8 @@ bool MessPoly::playNote(int /*channel*/, int /*pitch*/, int /*velo*/)
bool MessPoly::setController(int /*channel*/, int num, int /*val*/)
{
switch(num) {
- case CTRL_VOLUME:
- case CTRL_EXPRESSION:
+ case MusECore::CTRL_VOLUME:
+ case MusECore::CTRL_EXPRESSION:
break;
}
return false;