X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_content.cc;h=170b9299f5578d312e514d7c34fd613bd916fd02;hb=26a4298fcd173a59dc94094df6058e7e96dfa786;hp=f3372011933c724985e2b172d8e37124ad908d91;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc index f33720119..170b9299f 100644 --- a/src/lib/audio_content.cc +++ b/src/lib/audio_content.cc @@ -196,10 +196,9 @@ 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 (_parent->active_video_frame_rate(film), film->video_frame_rate()); + FrameRateChange frc (film, _parent); /* 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 @@ -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