_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.
*/
_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;
}
}