summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-15 15:46:49 +0100
committerRobin Gareus <robin@gareus.org>2016-02-15 15:46:49 +0100
commite6ea35c3de0c234a99443a05a131540dd821487c (patch)
tree5cc035799079d8c4860b855449b61e23836b7a9e /libs/audiographer/audiographer
parentb9efb2ae21b785ef7273af22df1a8fcad168227f (diff)
Add normalization gain factor to Export Analysis
Diffstat (limited to 'libs/audiographer/audiographer')
-rw-r--r--libs/audiographer/audiographer/general/analyser.h7
-rw-r--r--libs/audiographer/audiographer/general/normalizer.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/libs/audiographer/audiographer/general/analyser.h b/libs/audiographer/audiographer/general/analyser.h
index e79e4107dc..e8ca534954 100644
--- a/libs/audiographer/audiographer/general/analyser.h
+++ b/libs/audiographer/audiographer/general/analyser.h
@@ -41,8 +41,15 @@ class LIBAUDIOGRAPHER_API Analyser : public ListedSource<float>, public Sink<flo
void process (ProcessContext<float> const & c);
ARDOUR::ExportAnalysisPtr result ();
+ void set_normalization_gain (float gain) {
+ _result.normalized = true;
+ _result.norm_gain_factor = gain;
+ }
+
using Sink<float>::process;
+ static const float fft_range_db;
+
private:
float fft_power_at_bin (const uint32_t b, const float norm) const;
diff --git a/libs/audiographer/audiographer/general/normalizer.h b/libs/audiographer/audiographer/general/normalizer.h
index 025131022e..e5f73a0f08 100644
--- a/libs/audiographer/audiographer/general/normalizer.h
+++ b/libs/audiographer/audiographer/general/normalizer.h
@@ -21,7 +21,7 @@ public:
~Normalizer();
/// Sets the peak found in the material to be normalized \see PeakReader \n RT safe
- void set_peak (float peak);
+ float set_peak (float peak);
/** Allocates a buffer for using with const ProcessContexts
* This function does not need to be called if