IanB
26th June 2004, 16:50
Given the FrameRate() function returns quite limited precision, less then 32 bit float, can functions for FrameRateNumerator() and FrameRateDenominator() be include in the scripting interface to provide access to the maximum precision available.
I have logged a RFE on sourceforge:- "[ 980307 ] FrameRate Numerator & Denominator script functions" with attached updated script.cpp and script.h files that implement these 2 extra functions.
See:- http://sourceforge.net/tracker/index.php?func=detail&aid=980307&group_id=57023&atid=482676
In addition in order to maximise the restricted precision the code for FrameRate() has been modified to perform the division of numerator by denominator using double precision which finally in turn is reduced to a float.
Also included is an alternate version of AudioLength(), called AudioLengthF(), which returns a float. Although of limited precicion, it does not become negative when more than 2^31 samples are present and gives the correct order of magnitude. (Devious scripting using both functions and modulo arithmetic can represent the exact audio sample count if required).
IanB
I have logged a RFE on sourceforge:- "[ 980307 ] FrameRate Numerator & Denominator script functions" with attached updated script.cpp and script.h files that implement these 2 extra functions.
See:- http://sourceforge.net/tracker/index.php?func=detail&aid=980307&group_id=57023&atid=482676
In addition in order to maximise the restricted precision the code for FrameRate() has been modified to perform the division of numerator by denominator using double precision which finally in turn is reduced to a float.
Also included is an alternate version of AudioLength(), called AudioLengthF(), which returns a float. Although of limited precicion, it does not become negative when more than 2^31 samples are present and gives the correct order of magnitude. (Devious scripting using both functions and modulo arithmetic can represent the exact audio sample count if required).
IanB