MythTV  master
videovisualspectrum.h
Go to the documentation of this file.
1 #ifndef VIDEOVISUALSPECTRUM_H
2 #define VIDEOVISUALSPECTRUM_H
3 
4 #include <QVector>
5 #include "videovisual.h"
6 
8 {
9  public:
11  ~VideoVisualSpectrum() override;
12 
13  void Draw(const QRect &area, MythPainter *painter,
14  QPaintDevice* device) override; // VideoVisual
15  QString Name(void) override { return "Spectrum"; } // VideoVisual
16  void prepare() override; // VideoVisual
17 
18  protected:
19  virtual bool Initialise(const QRect &area);
20  virtual bool InitialisePriv(void);
21  virtual void DrawPriv(MythPainter *painter, QPaintDevice* device);
22 
23  int m_numSamples {64};
24  QVector<double> m_magnitudes;
25  double m_range {1.0};
27  double m_scaleFactor {2.0};
28  double m_falloff {3.0};
29 
30  fftw_plan m_lplan;
31  fftw_plan m_rplan;
32  myth_fftw_float *m_lin {nullptr};
33  myth_fftw_float *m_rin {nullptr};
34  myth_fftw_complex *m_lout {nullptr};
35  myth_fftw_complex *m_rout {nullptr};
36 
37  private:
38  QVector<QRect> m_rects;
39  int m_barWidth {1};
40 };
41 
42 #endif // VIDEOVISUALSPECTRUM_H
QString Name(void) override
myth_fftw_complex * m_lout
myth_fftw_float * m_lin
myth_fftw_complex * m_rout
VideoVisualSpectrum(AudioPlayer *audio, MythRender *render)
QVector< QRect > m_rects
myth_fftw_float * m_rin
QVector< double > m_magnitudes
virtual void DrawPriv(MythPainter *painter, QPaintDevice *device)
void Draw(const QRect &area, MythPainter *painter, QPaintDevice *device) override
virtual bool Initialise(const QRect &area)
virtual bool InitialisePriv(void)