Fix failure to update project-wide audio level plot when content moves.
[dcpomatic.git] / src / lib / film.cc
index c57fc165cf9a1b72db957cccd2ac8ef4dff8092f..0b717738d09bfacd7198b870003869123dd7edb7 100644 (file)
@@ -284,13 +284,13 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
        auto p = dir ("analysis");
 
        Digester digester;
-       for (auto i: playlist->content ()) {
+       for (auto i: playlist->content()) {
                if (!i->audio) {
                        continue;
                }
 
-               digester.add (i->digest ());
-               digester.add (i->audio->mapping().digest ());
+               digester.add (i->digest());
+               digester.add (i->audio->mapping().digest());
                if (playlist->content().size() != 1) {
                        /* Analyses should be considered equal regardless of gain
                           if they were made from just one piece of content.  This
@@ -298,7 +298,14 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
                           analysis at the plotting stage rather than having to
                           recompute it.
                        */
-                       digester.add (i->audio->gain ());
+                       digester.add (i->audio->gain());
+
+                       /* Likewise we only care about position if we're looking at a
+                        * whole-project view.
+                        */
+                       digester.add (i->position().get());
+                       digester.add (i->trim_start().get());
+                       digester.add (i->trim_end().get());
                }
        }