summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-07 19:03:07 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-07 19:03:07 +1000
commit833cd8fbfabab9e3ffa445917b1516456e2f06de (patch)
tree202329529dd81ec8576a40141b0df47cce39b541
parentplugin/cim: fix uninitialised pointer (diff)
downloadcaelestia-shell-833cd8fbfabab9e3ffa445917b1516456e2f06de.tar.gz
caelestia-shell-833cd8fbfabab9e3ffa445917b1516456e2f06de.tar.bz2
caelestia-shell-833cd8fbfabab9e3ffa445917b1516456e2f06de.zip
plugin/cp: update values when bars changed
-rw-r--r--plugin/src/Caelestia/cavaprovider.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/src/Caelestia/cavaprovider.cpp b/plugin/src/Caelestia/cavaprovider.cpp
index ffc98a6..8841ded 100644
--- a/plugin/src/Caelestia/cavaprovider.cpp
+++ b/plugin/src/Caelestia/cavaprovider.cpp
@@ -99,7 +99,8 @@ void CavaProcessor::processChunk(const QVector<double>& chunk) {
CavaProvider::CavaProvider(int sampleRate, int chunkSize, QObject* parent)
: AudioProvider(sampleRate, chunkSize, parent)
- , m_bars(0) {
+ , m_bars(0)
+ , m_values(m_bars) {
m_processor = new CavaProcessor(this);
init();
@@ -120,8 +121,10 @@ void CavaProvider::setBars(int bars) {
return;
}
+ m_values.resize(bars);
m_bars = bars;
emit barsChanged();
+ emit valuesChanged();
QMetaObject::invokeMethod(m_processor, "setBars", Qt::QueuedConnection, Q_ARG(int, bars));
}