Skip to content

Commit

Permalink
Plugins/Loopback: fixed spurious values emitted when a lot of channel…
Browse files Browse the repository at this point in the history
…s are looped (fixes #948)

I think there is still something wrong in how QByteArrays are used though.
They are all used by reference and if by any chance the reference of the original data changes,
there might be transitions with random data, if not a segfault
  • Loading branch information
mcallegari committed Apr 24, 2017
1 parent 83761c3 commit 30e14d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions debian/changelog
Expand Up @@ -4,6 +4,7 @@ qlcplus (4.11.0) stable; urgency=low
* engine: fixed crash when pausing a Show with an unavailable audio file
* UI: enabled Alt key combinations on macOS to behave like other platforms (thanks to Matt Mayfield)
* UI/RGB Panel: added panel direction (thanks to Raivis Rengelis)
* UI/Scene Editor: preserve fixture tab order when fixtures with no channels set are present
* UI/RGB Matrix Editor: allow the preview to run even in operate mode
* UI/Audio Editor: added the possibility to loop an audio file (thanks to Raivis Rengelis)
* UI/Simple Desk: fixed crash when changing values from a channel group in "fixtures view" mode
Expand All @@ -17,6 +18,7 @@ qlcplus (4.11.0) stable; urgency=low
* Virtual Console/Cue List: improved linked crossfade to perform an additive blending between steps (see documentation)
* Virtual Console/Speed Dial: improved tap button blinking and feedbacks (thanks to Lukas Jähn)
* Plugins/OSC: added channel number calculator in configuration page to help integrating new controllers
* Plugins/Loopback: fixed spurious values emitted when a lot of channels are looped
* Web access: fixed VC Slider in percentage mode and inverted appearance (thanks to Bartosz Grabias)
* Web access: support VC Slider reduced range when in level mode
* Web access: improved getChannelsValues and added Simple Desk reset per-channel (sdResetChannel API)
Expand Down
8 changes: 4 additions & 4 deletions plugins/loopback/src/loopback.cpp
Expand Up @@ -187,7 +187,7 @@ void Loopback::writeUniverse(quint32 universe, quint32 output, const QByteArray
if (!m_outputMap.contains(output))
return;

QByteArray & chData = m_channelData[output];
QByteArray &chData = m_channelData[output];

if (m_inputMap.contains(output))
{
Expand All @@ -197,12 +197,12 @@ void Loopback::writeUniverse(quint32 universe, quint32 output, const QByteArray
{
if (chData[i] != data[i])
{
emit valueChanged(inputUniverse, output, i, data[i]);
chData[i] = data[i];
//qDebug() << "Data changed at" << i << QString::number(chData[i]) << QString::number(data[i]);
emit valueChanged(inputUniverse, output, i, chData[i]);
}
}
}

chData = data;
}

void Loopback::sendFeedBack(quint32 universe, quint32 input, quint32 channel, uchar value, const QString &)
Expand Down

0 comments on commit 30e14d5

Please sign in to comment.