diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-01 23:37:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-01 23:37:55 +0100 |
| commit | 4bf5a8794cf1ed6411e085b35c11777c3508f82e (patch) | |
| tree | 2e0390a371a9fe828307b6d11313726299f232e3 /src/lib/audio_analysis.h | |
| parent | 92b6430402753a572c33d594ba0745a4e461edf4 (diff) | |
Restore short-cutting of analysis gain updates.
If we have an analysis of one piece of content and
the gain changes we don't re-run the analysis, instead
applying a suitable `correction' in the UI.
Diffstat (limited to 'src/lib/audio_analysis.h')
| -rw-r--r-- | src/lib/audio_analysis.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/audio_analysis.h b/src/lib/audio_analysis.h index 2411b4316..478b0e532 100644 --- a/src/lib/audio_analysis.h +++ b/src/lib/audio_analysis.h @@ -75,12 +75,25 @@ public: return _peak_time; } + boost::optional<double> analysis_gain () const { + return _analysis_gain; + } + + void set_analysis_gain (double gain) { + _analysis_gain = gain; + } + void write (boost::filesystem::path); private: std::vector<std::vector<AudioPoint> > _data; boost::optional<float> _peak; boost::optional<DCPTime> _peak_time; + /** If this analysis was run on a single piece of + * content we store its gain in dB when the analysis + * happened. + */ + boost::optional<double> _analysis_gain; }; #endif |
