Go to the documentation of this file.
23 av_freep(
reinterpret_cast<void*
>(&
m_dftL));
24 av_freep(
reinterpret_cast<void*
>(&
m_dftR));
28 template<
typename T> T
sq(T a) {
return a*a; };
37 QMutexLocker locker(
mutex());
39 if (Area.isEmpty() || !Painter)
48 for (
auto k = 0; k < node->
m_length; k++)
50 m_dftL[k] = (FFTComplex){ .re = (FFTSample)node->
m_left[k], .im = 0 };
52 m_dftR[k] = (FFTComplex){ .re = (FFTSample)node->
m_right[k], .im = 0 };
59 m_dftL[k] = (FFTComplex){ .re = 0, .im = 0 };
60 m_dftL[k] = (FFTComplex){ .re = 0, .im = 0 };
91 magL = std::max(magL, 1.0);
103 magR = std::max(magR, 1.0);
120 static const QBrush kBrush(QColor(0, 0, 200, 180));
121 static const QPen kPen(QColor(255, 255, 255, 255));
125 for (
int i = 0; i < count; i++)
162 LOG(VB_GENERAL, LOG_INFO,
DESC + QString(
"Initialised Spectrum with %1 bars").arg(
m_scale.
range()));
169 const QString &
name()
const override;
static constexpr int k_FFT_sample_length
virtual bool InitialisePriv()
const QString & name() const override
FFTContext * m_fftContextForward
virtual bool Initialise(QRect Area)
QVector< double > m_magnitudes
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual void DrawRect(QRect area, const QBrush &fillBrush, const QPen &linePen, int alpha)
A device containing images (ie. USB stick, CD, storage group etc)
void setMax(int maxscale, int maxrange)
bool SupportedRenderer(RenderType) override
VideoVisualSpectrum(AudioPlayer *Audio, MythRender *Render)
static eu8 clamp(eu8 value, eu8 low, eu8 high)
~VideoVisualSpectrum() override
VideoVisual * Create(AudioPlayer *Audio, MythRender *Render) const override
VideoVisualSpectrumFactory VideoVisualSpectrumFactory
void Draw(QRect Area, MythPainter *Painter, QPaintDevice *Device) override
virtual void DrawPriv(MythPainter *Painter, QPaintDevice *Device)
VisualNode * GetNode(void)
None log(str msg, int level=LOGDEBUG)
virtual void Begin(QPaintDevice *)
std::chrono::milliseconds SetLastUpdate(void)