another try to fix sequencer

This commit is contained in:
ws 2013-04-29 20:16:06 +02:00
parent 694a8ab590
commit 71574a00a1

View file

@ -417,7 +417,7 @@ void Seq::guiStop()
void Seq::seqMessage(int msg)
{
switch(msg) {
case '0': // STOP
case '2':
guiStop();
// heartBeatTimer->stop();
if (_driver && mscore->getSynthControl()) {
@ -431,6 +431,19 @@ void Seq::seqMessage(int msg)
}
seek(0);
break;
case '0': // STOP
guiStop();
// heartBeatTimer->stop();
if (_driver && mscore->getSynthControl()) {
meterValue[0] = .0f;
meterValue[1] = .0f;
meterPeakValue[0] = .0f;
meterPeakValue[1] = .0f;
peakTimer[0] = 0;
peakTimer[1] = 0;
mscore->getSynthControl()->setMeter(0.0, 0.0, 0.0, 0.0);
}
break;
case '1': // PLAY
emit started();
@ -559,7 +572,10 @@ void Seq::process(unsigned n, float* buffer)
// send sustain off
// TODO: channel?
putEvent(NPlayEvent(ME_CONTROLLER, 0, CTRL_SUSTAIN, 0));
emit toGui('0');
if (playPos == events.cend())
emit toGui('2');
else
emit toGui('0');
}
else if (state != driverState)
qDebug("Seq: state transition %d -> %d ?\n",
@ -783,9 +799,6 @@ void Seq::seek(int utick)
if (events.empty() || cs->playlistDirty() || playlistChanged)
collectEvents();
// int ucur = cs->repeatList()->utick2tick(playPos->first);
// if (utick != ucur)
// updateSynthesizerState(ucur, utick);
int tick = cs->repeatList()->utick2tick(utick);
Segment* seg = cs->tick2segment(tick);
if (seg)