summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-02 22:08:29 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-02 22:08:29 +0100
commit43db901b50575daf978621384264d5c0131ecf06 (patch)
tree3622c11c85dfb52576812b5d2a1b8115edb59c6e /src/lib
parent173bbf984547a598df87656b0a5c8087a4ed7c2e (diff)
Use drop-frame sound hack for 30 fps drop as well.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film_state.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/film_state.cc b/src/lib/film_state.cc
index 0c1ac87dc..d7d9a1462 100644
--- a/src/lib/film_state.cc
+++ b/src/lib/film_state.cc
@@ -285,8 +285,8 @@ FilmState::target_sample_rate () const
{
double t = dcp_audio_sample_rate (audio_sample_rate);
if (rint (frames_per_second) != frames_per_second) {
- if (fabs (frames_per_second - 23.976) < 1e-6) {
- /* 24fps drop-frame ie 24 * 1000 / 1001 frames per second;
+ if (fabs (frames_per_second - 23.976) < 1e-6 || (fabs (frames_per_second - 29.97) < 1e-6)) {
+ /* 24fps or 30fps drop-frame ie {24,30} * 1000 / 1001 frames per second;
hence we need to resample the audio to dcp_audio_sample_rate * 1000 / 1001
so that when we play it back at dcp_audio_sample_rate it is sped up
by the same amount that the video is