-/** @return The sampling rate that we will resample the audio to */
-int
-Film::target_audio_sample_rate () const
-{
- /* XXX: how often is this method called? */
-
- boost::shared_ptr<Playlist> p = playlist ();
- if (p->has_audio ()) {
- return 0;
- }
-
- /* Resample to a DCI-approved sample rate */
- double t = dcp_audio_sample_rate (p->audio_frame_rate());
-
- FrameRateConversion frc (p->video_frame_rate(), dcp_frame_rate());
-
- /* 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
- look different in the DCP compared to the source (slower or faster).
- skip/repeat doesn't come into effect here.
- */
-
- if (frc.change_speed) {
- t *= p->video_frame_rate() * frc.factor() / dcp_frame_rate();
- }
-
- return rint (t);
-}
-