summaryrefslogtreecommitdiff
path: root/muse2/muse/driver
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-09-09 21:29:24 +0000
committerTim E. Real <termtech@rogers.com>2011-09-09 21:29:24 +0000
commitefc7169b5f31ca13f970ae19e3d41c361acace41 (patch)
tree25fefb2df088f75e9b0126c7c71a60cea74e49ff /muse2/muse/driver
parent2120ea4f083228dde0d7307203391a4ec8f57e2d (diff)
More massive cleanups, update ChangeLog.
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r--muse2/muse/driver/alsamidi.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp
index 9a62dbdd..6395bf2d 100644
--- a/muse2/muse/driver/alsamidi.cpp
+++ b/muse2/muse/driver/alsamidi.cpp
@@ -400,6 +400,37 @@ bool MidiAlsaDevice::putEvent(snd_seq_event_t* event)
// Called from ALSA midi sequencer thread only.
//---------------------------------------------------------
+#if 0
+void MidiAlsaDevice::processMidi()
+{
+ processStuckNotes();
+ if (_playEvents.empty())
+ return;
+ int port = midiPort();
+ MidiPort* mp = port != -1 ? &midiPorts[port] : 0;
+ unsigned curFrame = audio->curFrame();
+ int tickpos = audio->tickPos();
+ bool extsync = extSyncFlag.value();
+ //int frameOffset = getFrameOffset();
+ //int nextTick = audio->nextTick();
+
+ // Play all events up to current frame.
+ iMPEvent i = _playEvents.begin();
+ for (; i != _playEvents.end(); ++i) {
+ if (i->time() > (extsync ? tickpos : curFrame)) // p3.3.25 Check: Should be nextTickPos? p4.0.34
+ break;
+ if(mp){
+ if (mp->sendEvent(*i))
+ break;
+ }
+ else
+ if(putMidiEvent(*i))
+ break;
+ }
+ _playEvents.erase(_playEvents.begin(), i);
+}
+
+#else
void MidiAlsaDevice::processMidi()
{
bool stop = stopPending; // Snapshots
@@ -638,6 +669,7 @@ void MidiAlsaDevice::handleSeek()
}
}
}
+#endif
//---------------------------------------------------------
// initMidiAlsa