Back-port v2's rename and slight extension of FrameRateConversion.
[dcpomatic.git] / src / lib / audio_content.cc
index 79912f1aee7ec4eb1f86a2b208fd33eb0bba6c75..7d77154e17eaf044be7e5e9e9ea9751ede18f306 100644 (file)
@@ -25,6 +25,7 @@
 #include "film.h"
 #include "exceptions.h"
 #include "config.h"
+#include "frame_rate_change.h"
 
 #include "i18n.h"
 
@@ -159,7 +160,7 @@ AudioContent::output_audio_frame_rate () const
        /* Resample to a DCI-approved sample rate */
        double t = dcp_audio_frame_rate (content_audio_frame_rate ());
 
-       FrameRateConversion frc (video_frame_rate(), film->video_frame_rate());
+       FrameRateChange frc (video_frame_rate(), film->video_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
@@ -168,7 +169,7 @@ AudioContent::output_audio_frame_rate () const
        */
 
        if (frc.change_speed) {
-               t *= video_frame_rate() * frc.factor() / film->video_frame_rate();
+               t /= frc.speed_up;
        }
 
        return rint (t);