summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-02-22 13:40:17 +0000
committerCarl Hetherington <cth@carlh.net>2017-04-19 23:04:32 +0100
commitb20c4b11abff0bd57dab03174070ec8571bbe4d5 (patch)
tree305ac5e9e346a644743348173caefc7422fe179f /src/lib/writer.cc
parent8edc349253daf5eb0d9ceb75f467cdbbc668f27a (diff)
Fix pull timing; fix units of ReelWriter::total_written_audio_frames.
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 88925cbbd..74e5e3ec0 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -229,7 +229,7 @@ Writer::fake_write (Frame frame, Eyes eyes)
_empty_condition.notify_all ();
}
-/** Write one video frame's worth of audio frames to the DCP.
+/** Write some audio frames to the DCP.
* @param audio Audio data or 0 if there is no audio to be written here (i.e. it is referenced).
* This method is not thread safe.
*/
@@ -243,8 +243,7 @@ Writer::write (shared_ptr<const AudioBuffers> audio)
_audio_reel->write (audio);
- /* written is in video frames, not audio frames */
- if (_audio_reel->total_written_audio_frames() >= _audio_reel->period().duration().frames_floor (_film->video_frame_rate())) {
+ if (_audio_reel->total_written_audio_frames() >= _audio_reel->period().duration().frames_floor (_film->audio_frame_rate())) {
++_audio_reel;
}
}