MythTV  master
audiooutputgraph.h
Go to the documentation of this file.
1 #ifndef AUDIOOUTPUTGRAPH_H
2 #define AUDIOOUTPUTGRAPH_H
3 
4 // Qt
5 #include <QMutex>
6 
7 // MythTV
8 #include "mythexp.h"
9 #include "visual.h"
10 
11 class MythImage;
12 class MythPainter;
13 
15 {
16  public:
18  ~AudioOutputGraph() override;
19 
20  void SetPainter(MythPainter* Painter);
21  void SetSampleRate(uint16_t SampleRate);
22  void SetSampleCount(uint16_t SampleCount);
23  void SetSilenceLevel(int Db = -72) { m_dBsilence = Db; }
24  void SetQuietLevel(int Db = -60) { m_dBquiet = Db; }
25  void SetLoudLevel(int Db = -12) { m_dBLoud = Db; }
26  void SetMaxLevel(int Db = -6) { m_dbMax = Db; }
27  MythImage* GetImage(std::chrono::milliseconds Timecode) const;
28  void Reset();
29 
30  public:
31  void add(const void * _Buffer, unsigned long Length, std::chrono::milliseconds Timecode,
32  int Channnels, int Bits) override;
33  void prepare() override;
34 
35  private:
36  MythPainter* m_painter { nullptr };
37  int m_dBsilence { -72 };
38  int m_dBquiet { -60 };
39  int m_dBLoud { -12 };
40  int m_dbMax { -6 };
41  class Buffer;
42  Buffer* const m_buffer { nullptr };
43  QMutex mutable m_mutex;
44 };
45 
46 #endif
MythTV::Visual::add
virtual void add(const void *b, unsigned long b_len, std::chrono::milliseconds timecode, int c, int p)=0
MythTV::Visual::prepare
virtual void prepare()=0
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
AudioOutputGraph
Definition: audiooutputgraph.h:14
AudioOutputGraph::SetSilenceLevel
void SetSilenceLevel(int Db=-72)
Definition: audiooutputgraph.h:23
mythexp.h
AudioOutputGraph::Buffer
Definition: audiooutputgraph.cpp:26
SampleRate
Definition: recordingprofile.cpp:109
MythTV::Visual
Definition: visual.h:16
AudioOutputGraph::SetMaxLevel
void SetMaxLevel(int Db=-6)
Definition: audiooutputgraph.h:26
AudioOutputGraph::SetLoudLevel
void SetLoudLevel(int Db=-12)
Definition: audiooutputgraph.h:25
Buffer
Definition: MythExternControl.h:36
MythPainter
Definition: mythpainter.h:32
MythImage
Definition: mythimage.h:36
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:3
AudioOutputGraph::m_mutex
QMutex m_mutex
Definition: audiooutputgraph.h:43
AudioOutputGraph::SetQuietLevel
void SetQuietLevel(int Db=-60)
Definition: audiooutputgraph.h:24
visual.h