From 4bf5a8794cf1ed6411e085b35c11777c3508f82e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 1 Jul 2015 23:37:55 +0100 Subject: 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. --- src/lib/audio_analysis.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lib/audio_analysis.h') 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 analysis_gain () const { + return _analysis_gain; + } + + void set_analysis_gain (double gain) { + _analysis_gain = gain; + } + void write (boost::filesystem::path); private: std::vector > _data; boost::optional _peak; boost::optional _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 _analysis_gain; }; #endif -- cgit v1.2.3