-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
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
Why fixed point instead of float? #16
Comments
Sorry, I'm lacking context here. Where is fixed point arithmetic used? |
Maybe i'm just assuming it, but isn't this fixed point arithmetic? https://github.com/Holzhaus/vinylla/blob/main/src/util.rs#L68 Also here the sample is a i32 ? I would have expected an f32 ? Line 72 in 659fe1e
|
No, that's just integer math. Not using fixed point arithmeric anywhere IIRC.
Originally the samples are an i16, because 16 bit audio should suffice for our purposes. The Serato timecode audio CDs are also 16 bit anyway. https://github.com/Holzhaus/vinylla/blob/main/src%2Ftimecode.rs#L129-L130 Using integers here because it's faster and I don't see an advantage in using floating point math for this use case. |
Is there any reason to use fixed point over float? I thought it was an optimization of the past, but maybe I'm misinformed?
The text was updated successfully, but these errors were encountered: