[vlc-devel] [PATCH 06/15] vlc_common: add helper fonctions to convert from mtime_t to floating point seconds
Rémi Denis-Courmont
remi at remlab.net
Sat Jun 16 10:27:38 CEST 2018
Le lauantaina 16. kesäkuuta 2018, 10.37.13 EEST Steve Lhomme a écrit :
> In many case where it's used it's not obvious the output is requested in
> float rather than int. Like sout << secf_from_vtick()
And? Type selection is done by the input, not the output.
> Also the rounding may not be the same. For floating point llround() is
> used in a few places. For integer it may be different although
> everything I saw implied rounding down.
If you care about rounding, you cannot use those macros or functions anyway.
The use case will need to convert manually as fits.
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list