diff options
author | Florian Jung <flo@windfisch.org> | 2011-09-10 18:55:56 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-09-10 18:55:56 +0000 |
commit | 8595cf0d68091d5c3bd20db53a156efe3e669439 (patch) | |
tree | c357e4120fe5edae9bea572ef0bf8a7d5e26fb5a /muse2/muse/driver | |
parent | 24f84a489364741eb3fc126a3f83d91a86b65e27 (diff) | |
parent | dbf95342105219cec66f9903a3cfc605ec7206a5 (diff) |
merged again. please continue developing the deep changes HERE. thanks
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r-- | muse2/muse/driver/alsamidi.cpp | 32 |
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 |