From f7dcb3be4ca3181b05f45974bbe05730bb0e53b7 Mon Sep 17 00:00:00 2001 From: Digital Artifex <7929434+DigitalArtifex@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:53:05 -0500 Subject: [PATCH] Changed default audio texture init --- plugin/AudioModel.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugin/AudioModel.cpp b/plugin/AudioModel.cpp index ba31e3b..0d1339e 100644 --- a/plugin/AudioModel.cpp +++ b/plugin/AudioModel.cpp @@ -16,6 +16,10 @@ AudioModel::AudioModel(QObject *parent) : QObject(parent) { + //init a blank 512x2 texture for the audio provider + m_frame = QPixmap(512, 2); + m_frame.fill(QColor()); + m_impl_data = { nullptr, nullptr, {0, 0, {}}, 1, {}, {}, 0.0}; m_impl_data.samples.reserve(4096); m_impl_data.smoothed.reserve(2048); @@ -151,7 +155,12 @@ void AudioModel::startCaptureAsync() QPixmap AudioModel::frame() { if(!m_instance) - return QPixmap(); + { + QPixmap frame = QPixmap(512, 2); + frame.fill(QColor()); + + return frame; + } return m_instance->m_frame; }