Added backend support for audio buffers (PipeWire)

This commit is contained in:
Digital Artifex
2025-08-09 19:02:10 -04:00
parent 91ac5771c4
commit 22758910c3
6 changed files with 484 additions and 119 deletions

View File

@@ -0,0 +1,16 @@
#include "AudioImageProvider.h"
AudioImageProvider::AudioImageProvider()
: QQuickImageProvider(QQuickImageProvider::Pixmap) {}
QPixmap AudioImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
{
Q_UNUSED(id) // id is useless here. we always want to return the latest frame from AudioModel
Q_UNUSED(requestedSize) // requested size is useless too. texture must always be 512x2
if(size)
*size = AudioModel::frame().size();
//return the latest frame
return AudioModel::frame();
}