Only make 48kHz-audio DCPs for now (#1436).
authorCarl Hetherington <cth@carlh.net>
Sun, 23 Dec 2018 21:19:10 +0000 (21:19 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 23 Dec 2018 21:19:10 +0000 (21:19 +0000)
ChangeLog
src/lib/audio_content.cc
src/lib/audio_content.h
src/lib/film.cc

index 0ef01127e6700b3b9744e4a9e34273f7336e597a..03a60ffee783ad9c160c4bdbf4f09eff9e4530d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-23  Carl Hetherington  <cth@carlh.net>
+
+       * Only make DCPs with 48kHz audio (#1436).
+
 2018-12-10  Carl Hetherington  <cth@carlh.net>
 
        * Accept certificate chains to dcpomatic2_kdm_cli as well
index b513fb443de0ec3e6631914bf3a1f1299a8bfe87..170b9299f5578d312e514d7c34fd613bd916fd02 100644 (file)
@@ -196,8 +196,7 @@ AudioContent::mapping () const
 int
 AudioContent::resampled_frame_rate (shared_ptr<const Film> film) const
 {
-       /* Resample to a DCI-approved sample rate */
-       double t = has_rate_above_48k() ? 96000 : 48000;
+       double t = film->audio_frame_rate ();
 
        FrameRateChange frc (film, _parent);
 
@@ -264,19 +263,6 @@ AudioContent::processing_description (shared_ptr<const Film> film) const
        return "";
 }
 
-/** @return true if any stream in this content has a sampling rate of more than 48kHz */
-bool
-AudioContent::has_rate_above_48k () const
-{
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
-               if (i->frame_rate() > 48000) {
-                       return true;
-               }
-       }
-
-       return false;
-}
-
 /** @return User-visible names of each of our audio channels */
 vector<string>
 AudioContent::channel_names () const
index 051fc8db8941f137fdd54d90f457dd709204aa42..98e16a45773f3c0ca0debad384f0c2d6b9e0ef20 100644 (file)
@@ -53,7 +53,6 @@ public:
        AudioMapping mapping () const;
        void set_mapping (AudioMapping);
        int resampled_frame_rate (boost::shared_ptr<const Film> film) const;
-       bool has_rate_above_48k () const;
        std::vector<std::string> channel_names () const;
 
        void set_gain (double);
index cbf08aa498075986b7670bf03081888c2b0cf00e..029cfe62097fec8dd7c9e3cbd8b4e5ebc94ff0a6 100644 (file)
@@ -1213,12 +1213,9 @@ Film::playlist_order_changed ()
 int
 Film::audio_frame_rate () const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, content ()) {
-               if (i->audio && i->audio->has_rate_above_48k ()) {
-                       return 96000;
-               }
-       }
-
+       /* It seems that nobody makes 96kHz DCPs at the moment, so let's avoid them.
+          See #1436.
+       */
        return 48000;
 }