diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-12-23 21:19:10 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-12-23 21:19:10 +0000 |
| commit | e7a9a9a0b69d605e327d5a74abe28481d2a61179 (patch) | |
| tree | 043d155fe9175ae5ac2607c39fe451ad69aaafe0 /src/lib | |
| parent | debf377abe77a8d3ac0880932d36c048138d9b3f (diff) | |
Only make 48kHz-audio DCPs for now (#1436).
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/audio_content.cc | 16 | ||||
| -rw-r--r-- | src/lib/audio_content.h | 1 | ||||
| -rw-r--r-- | src/lib/film.cc | 9 |
3 files changed, 4 insertions, 22 deletions
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<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 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<const Film> film) const; - bool has_rate_above_48k () const; std::vector<std::string> 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<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; } |
