]> git.tue.mpg.de Git - paraslash.git/commit
para_play: Compute the current time more accurately.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 13 Mar 2022 19:49:41 +0000 (20:49 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 3 Oct 2022 20:42:13 +0000 (22:42 +0200)
commita1632855167b61fd987b2bc8f3e6d2ef0972d0ea
treee334c4731c84ce7c7dc151573eb7dfd6bdc0fba9
parentf0a33ef73c351add6d9573827258aecb4e83c25a
para_play: Compute the current time more accurately.

Currently get_play_time() throws away the subsecond part of the
timeval and returns a number in seconds. We can improve on that
by letting the function return milliseconds instead. However, with
milliseconds we must perform multiplications using 64 bit integers
to avoid integer overflows.

This also affects the pause and play commands, which should now
reposition the stream more accurately. It still won't be perfect,
though, because play.c has no way of knowing the number of the chunk
which is currently being decoded.
play.c