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.cc | |
| 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.cc')
| -rw-r--r-- | src/lib/audio_analysis.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc index 7e1dc6e78..127def807 100644 --- a/src/lib/audio_analysis.cc +++ b/src/lib/audio_analysis.cc @@ -102,6 +102,7 @@ AudioAnalysis::AudioAnalysis (boost::filesystem::path filename) _peak = f.number_child<float> ("Peak"); _peak_time = DCPTime (f.number_child<DCPTime::Type> ("PeakTime")); + _analysis_gain = f.optional_number_child<double> ("AnalysisGain"); } void @@ -149,5 +150,9 @@ AudioAnalysis::write (boost::filesystem::path filename) root->add_child("PeakTime")->add_child_text (raw_convert<string> (_peak_time.get().get ())); } + if (_analysis_gain) { + root->add_child("AnalysisGain")->add_child_text (raw_convert<string> (_analysis_gain.get ())); + } + doc->write_to_file_formatted (filename.string ()); } |
