projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4656657
)
Add comment.
author
Carl Hetherington
<cth@carlh.net>
Thu, 25 Jul 2013 08:53:47 +0000
(09:53 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 25 Jul 2013 08:53:47 +0000
(09:53 +0100)
src/lib/player.cc
patch
|
blob
|
history
diff --git
a/src/lib/player.cc
b/src/lib/player.cc
index 37f172f1da72ea922f7a69dc018e9151bbdd3dc1..8cc1849e865f0909001a55374954bca5fbe48247 100644
(file)
--- a/
src/lib/player.cc
+++ b/
src/lib/player.cc
@@
-295,6
+295,9
@@
Player::process_audio (weak_ptr<Piece> weak_piece, shared_ptr<const AudioBuffers
audio = dcp_mapped;
+ /* Convert frame to time. After resampling, the frame time (in the DCP rate) will be T_D where
+ T_D = frame * DCP_rate / original_rate. Hence the time in seconds is T_D / DCP_rate.
+ */
Time time = content->start() + (frame * TIME_HZ / _film->audio_frame_rate()) + (content->audio_delay() * TIME_HZ / 1000);
/* We must cut off anything that comes before the start of all time */