Skip to content

Commit

Permalink
Merge branch 'master' into filedialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 17, 2023
2 parents 9ad31de + cb9de72 commit f960635
Show file tree
Hide file tree
Showing 244 changed files with 21,822 additions and 8,732 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ jobs:
set MSYSTEM=MINGW32
#echo 'Silently installing QLC+...'
cd build
make install
make install/fast
cd ..
cp *.qm /c/qlcplus
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ coverage/
.vscode/

# CMake build
CMakeLists.txt.user
build*
1 change: 1 addition & 0 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ tlen=${#test[@]}
# arg1:srcdir arg2:testname
function prepare {
lcov -d ${1} -z || exit $?
rm -f ${1}/moc_*.gcno ${1}/moc_*.gcda
lcov -d ${1} -c -i -o coverage/${2}-base.info
}

Expand Down
14 changes: 14 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
qlcplus (4.12.8) stable; urgency=low

* engine: fix Chaser random startup (thanks to Dennis Suermann)
* engine: do not fade out looped audio
* engine: fix stopping audio with fade in and fade out while fading in
* Virtual Console/Slider: fix switching from playback to submaster mode
* Virtual Console/XY Pad: fix Scene preset controlling wrong channels
* Virtual Console/Clock: fix running a schedule the day after
* Virtual Console/Button: Scene flashing can force LTP and override (thanks to Dennis Suermann)
* Plugins/ArtNet: add default standard transmission mode as per protocol specifications
* Plugins/ArtNet,E1.31,OSC: add a parameter to wait for interfaces to be ready
* Plugins/DMX USB: add support for DMXKing MAX products
* Plugins/DMX USB: FTDI USB device no longer disappear after closing QLC+ on Linux
* Fixture Editor: fix aliases not updated when renaming a mode
* Web Access: add support for Cue List side fader and buttons layout (thanks to Itay Lifshitz)
* Web Access: add support for Slider knob appearance (thanks to Itay Lifshitz)
* Web Access: add VC Animation widget support (thanks to Itay Lifshitz)
* Web Access: add event to notify Function start/stop
* Input profiles: added PMJ 9 Faders Controller, Circus and MidiKey
* New fixture: Ibiza Mini Moving Star Wash (thanks to Chris Shucksmith)
* New fixtures: FOS Technologies IQ Par, IQ 28x12 Wash, Iridium 75W Spot (thanks to Maurizio Aru)
* New fixture: Varytec Hero Spot 60 (thanks to Hans-Jürgen Tappe)
Expand All @@ -29,6 +39,10 @@ qlcplus (4.12.8) stable; urgency=low
* New fixture: Shehds LED Flat Par 18x18W RGBWA+UV (thanks to Santiago Benejam)
* New fixture: Eurolite TMH-15 (thanks to Nicolas Rasor)
* New fixtures: Shehds JMS WEBB LED Wash Big Bee Eye 19X40W, LED 230W Beam Moving Head (thanks to István Király, Feiyu Shehds)
* New fixture: Shehds GalaxyJet Waterproof IP65 380W 19R Beam Moving Head (thanks to István Király, Feiyu Shehds)
* New fixture: Martin Ego X6 (thanks to Michael Tosatto)
* New fixture: Blizzard Lighting LB Hex Unplugged (thanks to David Sparks)
* New fixture: Eurolite LED Strobe SMD PRO 132 DMX RGB (thanks to Fede79)

-- Massimo Callegari <massimocallegari@yahoo.it> Sun, 17 Dec 2023 12:13:14 +0200

Expand Down
14 changes: 9 additions & 5 deletions engine/audio/src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ bool Audio::setSourceFileName(QString filename)
if (m_decoder == NULL)
return false;

setDuration(m_decoder->totalTime());
setTotalDuration(m_decoder->totalTime());

emit changed(id());
Expand Down Expand Up @@ -404,12 +405,15 @@ void Audio::write(MasterTimer* timer, QList<Universe *> universes)

incrementElapsed();

uint fadeout = overrideFadeOutSpeed() == defaultSpeed() ? fadeOutSpeed() : overrideFadeOutSpeed();

if (fadeout)
if (m_audio_out && !m_audio_out->isLooped())
{
if (m_audio_out != NULL && totalDuration() - elapsed() <= fadeOutSpeed())
m_audio_out->setFadeOut(fadeOutSpeed());
uint fadeout = overrideFadeOutSpeed() == defaultSpeed() ? fadeOutSpeed() : overrideFadeOutSpeed();

if (fadeout)
{
if (m_audio_out != NULL && totalDuration() - elapsed() <= fadeOutSpeed())
m_audio_out->setFadeOut(fadeOutSpeed());
}
}
}

Expand Down
33 changes: 17 additions & 16 deletions engine/audio/src/audioplugincache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,33 @@
AudioPluginCache::AudioPluginCache(QObject *parent)
: QObject(parent)
{
}

AudioPluginCache::~AudioPluginCache()
{
}

void AudioPluginCache::load(const QDir &dir)
{
qDebug() << Q_FUNC_INFO << dir.path();

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#if defined( __APPLE__) || defined(Q_OS_MAC)
#if defined( __APPLE__) || defined(Q_OS_MAC)
m_audioDevicesList = AudioRendererPortAudio::getDevicesInfo();
#elif defined(WIN32) || defined(Q_OS_WIN)
#elif defined(WIN32) || defined(Q_OS_WIN)
m_audioDevicesList = AudioRendererWaveOut::getDevicesInfo();
#else
#else
m_audioDevicesList = AudioRendererAlsa::getDevicesInfo();
#endif
#endif
#else
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_audioDevicesList = AudioRendererQt5::getDevicesInfo();
m_outputDevicesList = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
#else
#else
m_audioDevicesList = AudioRendererQt6::getDevicesInfo();
m_outputDevicesList = QMediaDevices::audioOutputs();
#endif
#endif
}

AudioPluginCache::~AudioPluginCache()
{
}

void AudioPluginCache::load(const QDir &dir)
{
qDebug() << Q_FUNC_INFO << dir.path();
#endif

/* Check that we can access the directory */
if (dir.exists() == false || dir.isReadable() == false)
Expand Down
31 changes: 23 additions & 8 deletions engine/audio/src/audiorenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

AudioRenderer::AudioRenderer (QObject* parent)
: QThread (parent)
, m_looped(false)
, m_fadeStep(0.0)
, m_userStop(true)
, m_pause(false)
Expand All @@ -33,7 +34,6 @@ AudioRenderer::AudioRenderer (QObject* parent)
, m_adec(NULL)
, audioDataRead(0)
, pendingAudioBytes(0)
, m_looped(false)
{
}

Expand All @@ -47,6 +47,20 @@ void AudioRenderer::adjustIntensity(qreal fraction)
m_intensity = CLAMP(fraction, 0.0, 1.0);
}

bool AudioRenderer::isLooped()
{
return m_looped;
}

void AudioRenderer::setLooped(bool looped)
{
m_looped = looped;
}

/*********************************************************************
* Fade sequences
*********************************************************************/

void AudioRenderer::setFadeIn(uint fadeTime)
{
m_fadeStep = 0;
Expand All @@ -66,14 +80,13 @@ void AudioRenderer::setFadeIn(uint fadeTime)

void AudioRenderer::setFadeOut(uint fadeTime)
{
if (fadeTime == 0 || m_fadeStep != 0 || m_adec == NULL)
if (fadeTime == 0 || m_adec == NULL)
return;

quint32 sampleRate = m_adec->audioParameters().sampleRate();
int channels = m_adec->audioParameters().channels();
qreal stepsCount = (qreal)fadeTime * ((qreal)(sampleRate * channels) / 1000);
m_fadeStep = -(m_intensity / stepsCount);
m_currentIntensity = m_intensity;

qDebug() << Q_FUNC_INFO << "stepsCount:" << stepsCount << ", fadeStep:" << m_fadeStep;
}
Expand All @@ -87,6 +100,10 @@ void AudioRenderer::stop()
m_currentIntensity = 1.0;
}

/*********************************************************************
* Thread functions
*********************************************************************/

void AudioRenderer::run()
{
qint64 audioDataWritten;
Expand All @@ -100,7 +117,7 @@ void AudioRenderer::run()
while (!m_userStop)
{
QMutexLocker locker(&m_mutex);
audioDataWritten = 0;

if (m_pause == false)
{
//qDebug() << "Pending audio bytes: " << pendingAudioBytes;
Expand All @@ -122,6 +139,8 @@ void AudioRenderer::run()
}
if (m_intensity != 1.0 || m_fadeStep != 0)
{
//qDebug() << "Intensity" << m_intensity << ", current" << m_currentIntensity << ", fadeStep" << m_fadeStep;

for (int i = 0; i < audioDataRead; i+=sampleSize)
{
qreal scaleFactor = m_intensity;
Expand Down Expand Up @@ -191,7 +210,3 @@ void AudioRenderer::run()
reset();
}

void AudioRenderer::setLooped(bool looped)
{
m_looped = looped;
}
5 changes: 4 additions & 1 deletion engine/audio/src/audiorenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ class AudioRenderer : public QThread

void adjustIntensity(qreal fraction);

/* Get/Set the looping flag */
bool isLooped();
void setLooped(bool looped);

private:
bool m_looped;

/*********************************************************************
* Fade sequences
Expand Down Expand Up @@ -145,7 +149,6 @@ class AudioRenderer : public QThread
unsigned char audioData[8 * 1024];
qint64 audioDataRead;
qint64 pendingAudioBytes;
bool m_looped;
};

/** @} */
Expand Down
7 changes: 3 additions & 4 deletions engine/src/channelmodifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
See the License for the specific language governing permissions and
limitations under the License.
*/

#include "channelmodifier.h"
#include "qlcfile.h"

#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QDebug>

#include "channelmodifier.h"
#include "qlcfile.h"

ChannelModifier::ChannelModifier()
{
m_values.fill(0, 256);
Expand Down
5 changes: 0 additions & 5 deletions engine/src/chaser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@
#include <QColor>
#include <QFile>

#include "qlcfixturedef.h"
#include "qlcfile.h"

#include "chaserrunner.h"
#include "mastertimer.h"
#include "chaserstep.h"
#include "function.h"
#include "fixture.h"
#include "chaser.h"
#include "scene.h"
#include "doc.h"
#include "bus.h"

Expand Down
3 changes: 0 additions & 3 deletions engine/src/chaserrunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@
#include <QDebug>

#include "chaserrunner.h"
#include "genericfader.h"
#include "mastertimer.h"
#include "fadechannel.h"
#include "chaserstep.h"
#include "qlcmacros.h"
#include "fixture.h"
#include "chaser.h"
#include "scene.h"
#include "doc.h"
Expand Down
2 changes: 0 additions & 2 deletions engine/src/collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>

#include "qlcfile.h"

#include "mastertimer.h"
#include "collection.h"
#include "function.h"
Expand Down
3 changes: 0 additions & 3 deletions engine/src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "qlcfixturemode.h"
#include "qlcfixturedef.h"
#include "qlcfile.h"

#include "monitorproperties.h"
#include "audioplugincache.h"
Expand All @@ -45,9 +44,7 @@
#include "sequence.h"
#include "fixture.h"
#include "chaser.h"
#include "scene.h"
#include "show.h"
#include "efx.h"
#include "doc.h"
#include "bus.h"

Expand Down
9 changes: 1 addition & 8 deletions engine/src/efx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@

#include <math.h>

#include "qlcfixturemode.h"
#include "qlcfixturedef.h"
#include "genericfader.h"
#include "qlcchannel.h"
#include "qlcmacros.h"
#include "qlcfile.h"

#include "mastertimer.h"
#include "fixture.h"
#include "scene.h"
#include "qlcmacros.h"
#include "doc.h"
#include "efx.h"
#include "bus.h"
Expand Down
3 changes: 2 additions & 1 deletion engine/src/fadechannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class FadeChannel
Override = (1 << 7), /** Override the current universe value */
SetTarget = (1 << 8), /** Set target to current universe value */
AutoRemove = (1 << 9), /** Automatically remove the channel once target is reached */
CrossFade = (1 << 10) /** Channel subject to crossfade */
CrossFade = (1 << 10), /** Channel subject to crossfade */
ForceLTP = (1 << 11) /** Force LTP for flashing scenes */
};

/** Create a new FadeChannel with empty/invalid values */
Expand Down
11 changes: 8 additions & 3 deletions engine/src/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ void Function::setTempoType(const Function::TempoType &type)
}

emit changed(m_id);
emit tempoTypeChanged();
}

Function::TempoType Function::tempoType() const
Expand Down Expand Up @@ -958,12 +959,16 @@ QList<quint32> Function::components()
* Flash
*****************************************************************************/

void Function::flash(MasterTimer *timer)
void Function::flash(MasterTimer *timer, bool shouldOverride, bool forceLTP)
{
Q_UNUSED(timer);
Q_UNUSED(shouldOverride);
Q_UNUSED(forceLTP);

if (m_flashing == false)
{
emit flashing(m_id, true);
}

m_flashing = true;
}
Expand Down Expand Up @@ -1266,15 +1271,15 @@ int Function::requestAttributeOverride(int attributeIndex, qreal value)
attributeID = m_lastOverrideAttributeId;
m_overrideMap[attributeID] = override;

qDebug() << name() << "Override requested for attribute" << attributeIndex << "value" << value << "new ID" << attributeID;
qDebug() << name() << "Override requested for new attribute" << attributeIndex << "value" << value << "new ID" << attributeID;

calculateOverrideValue(attributeIndex);

m_lastOverrideAttributeId++;
}
else
{
qDebug() << name() << "Override requested for attribute" << attributeIndex << "value" << value << "single ID" << attributeID;
qDebug() << name() << "Override requested for existing attribute" << attributeIndex << "value" << value << "single ID" << attributeID;
}

// actually apply the new override value
Expand Down

0 comments on commit f960635

Please sign in to comment.