Split FilterGraph into that and VideoFilterGraph.
[dcpomatic.git] / src / lib / audio_content.cc
index 39d93d375cb741217b24601b4933689505aa04ee..fc295aa0185556092d769110b07bfedbe36c1e86 100644 (file)
@@ -27,6 +27,7 @@
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/foreach.hpp>
+#include <iostream>
 
 #include "i18n.h"
 
@@ -72,7 +73,7 @@ AudioContent::AudioContent (shared_ptr<const Film> film, boost::filesystem::path
 AudioContent::AudioContent (shared_ptr<const Film> film, cxml::ConstNodePtr node)
        : Content (film, node)
 {
-       _audio_gain = node->number_child<float> ("AudioGain");
+       _audio_gain = node->number_child<double> ("AudioGain");
        _audio_delay = node->number_child<int> ("AudioDelay");
 }
 
@@ -190,13 +191,10 @@ AudioContent::audio_mapping () const
 int
 AudioContent::resampled_audio_frame_rate () const
 {
-       shared_ptr<const Film> film = _film.lock ();
-       DCPOMATIC_ASSERT (film);
-
        /* Resample to a DCI-approved sample rate */
        double t = has_rate_above_48k() ? 96000 : 48000;
 
-       FrameRateChange frc = film->active_frame_rate_change (position ());
+       FrameRateChange frc = film()->active_frame_rate_change (position ());
 
        /* Compensate if the DCP is being run at a different frame rate
           to the source; that is, if the video is run such that it will