MythTV  master
audiooutputgraph.h
Go to the documentation of this file.
1 #ifndef AUDIOOUTPUTGRAPH_H
2 #define AUDIOOUTPUTGRAPH_H
3 #include <cstdint>
4 
5 #include "mythexp.h"
6 #include <QMutex>
7 
8 #include "visual.h"
9 
10 class MythImage;
11 class MythPainter;
12 
14 {
15 public:
17  ~AudioOutputGraph() override;
18 
19  // Properties
20  void SetPainter(MythPainter* /*painter*/);
21  void SetSampleRate(unsigned sample_rate);
22  void SetSampleCount(unsigned sample_count);
23 
24  void SetSilenceLevel(int db = -72) { m_dBsilence = db; }
25  void SetQuietLevel(int db = -60) { m_dBquiet = db; }
26  void SetLoudLevel(int db = -12) { m_dBLoud = db; }
27  void SetMaxLevel(int db = -6) { m_dbMax = db; }
28 
29  // Operations
30  MythImage *GetImage(int64_t timecode) const;
31  void Reset();
32 
33  // MythTV::Visual implementation
34 public:
35  void add(const void *b, unsigned long b_len, unsigned long timecode,
36  int channels, int bits) override; // Visual
37  void prepare() override; // Visual
38 
39  // Implementation
40 private:
41  MythPainter *m_painter {nullptr};
42  int m_dBsilence {-72};
43  int m_dBquiet {-60};
44  int m_dBLoud {-12};
45  int m_dbMax {-6};
46  class Buffer;
47  Buffer * const m_buffer {nullptr};
48  QMutex mutable m_mutex;
49 };
50 
51 #endif // AUDIOOUTPUTGRAPH_H
virtual void add(const void *b, unsigned long b_len, unsigned long w, int c, int p)=0
#define MPUBLIC
Definition: mythexp.h:10
virtual void prepare()=0
unsigned char b
Definition: ParseText.cpp:329
void SetMaxLevel(int db=-6)
void SetLoudLevel(int db=-12)
void SetQuietLevel(int db=-60)
void SetSilenceLevel(int db=-72)