+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
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);
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
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);
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;
}