From: Carl Hetherington Date: Sun, 23 Dec 2018 21:19:10 +0000 (+0000) Subject: Only make 48kHz-audio DCPs for now (#1436). X-Git-Tag: v2.13.91~11 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=e7a9a9a0b69d605e327d5a74abe28481d2a61179;hp=debf377abe77a8d3ac0880932d36c048138d9b3f Only make 48kHz-audio DCPs for now (#1436). --- diff --git a/ChangeLog b/ChangeLog index 0ef01127e..03a60ffee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-12-23 Carl Hetherington + + * Only make DCPs with 48kHz audio (#1436). + 2018-12-10 Carl Hetherington * Accept certificate chains to dcpomatic2_kdm_cli as well diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index b513fb443..170b9299f 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -196,8 +196,7 @@ AudioContent::mapping () const int AudioContent::resampled_frame_rate (shared_ptr 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 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 AudioContent::channel_names () const diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h index 051fc8db8..98e16a457 100644 --- a/src/lib/audio_content.h +++ b/src/lib/audio_content.h @@ -53,7 +53,6 @@ public: AudioMapping mapping () const; void set_mapping (AudioMapping); int resampled_frame_rate (boost::shared_ptr film) const; - bool has_rate_above_48k () const; std::vector channel_names () const; void set_gain (double); diff --git a/src/lib/film.cc b/src/lib/film.cc index cbf08aa49..029cfe620 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1213,12 +1213,9 @@ Film::playlist_order_changed () int Film::audio_frame_rate () const { - BOOST_FOREACH (shared_ptr 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; }