We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding add and sub methods to Time, would be useful for calculating seek times for playbacks
My temporary solution:
// symphonia-core/src/units.rs impl Time { // ... pub fn add(self, other: Self) -> Self { Time { seconds: self.seconds + other.seconds, frac: self.frac + other.frac } } pub fn sub(self, other: Self) -> Self { // check for underflow let seconds = self.seconds.checked_sub(other.seconds).unwrap_or(0); let mut frac = self.frac - other.frac; if frac < 0.0 { frac = 0.0 } Time { seconds, frac } } ... }
feel free to share opinions
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Adding add and sub methods to Time, would be useful for calculating seek times for playbacks
My temporary solution:
feel free to share opinions
The text was updated successfully, but these errors were encountered: