Ardour  9.0-pre0-386-g96ef4d20f2
normalizer.h
Go to the documentation of this file.
1 #ifndef AUDIOGRAPHER_NORMALIZER_H
2 #define AUDIOGRAPHER_NORMALIZER_H
3 
5 #include "audiographer/sink.h"
8 
9 namespace AudioGrapher
10 {
11 
14  : public ListedSource<float>
15  , public Sink<float>
16  , public Throwing<>
17 {
18 public:
20  Normalizer (float target_dB, samplecnt_t);
22 
24  float set_peak (float peak);
25 
27  void process (ProcessContext<float> const & c);
28 
31 
32 private:
33  bool enabled;
34  float target;
35  float gain;
36 
37  float * buffer;
39 };
40 
41 
42 } // namespace
43 
44 #endif // AUDIOGRAPHER_NORMALIZER_H
An generic Source that uses a std::list for managing outputs.
Definition: listed_source.h:17
A class for normalizing to a specified target in dB.
Definition: normalizer.h:17
void process(ProcessContext< float > const &c)
Process a const ProcessContext.
Normalizer(float target_dB, samplecnt_t)
Constructs a normalizer with a specific target in dB RT safe.
samplecnt_t buffer_size
Definition: normalizer.h:38
void process(ProcessContext< float > &c)
Process a non-const ProcsesContext in-place RT safe.
float set_peak(float peak)
Sets the peak found in the material to be normalized.