-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
fix linear2db returning null #61935
base: master
Are you sure you want to change the base?
fix linear2db returning null #61935
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use a ternary operator instead of if
for readability. We do not use single-line if
statements in Godot's codebase.
I've updated it to use ternary operator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the formatting
You'll also want to squash the commits when you're done
linear2db return -80.0 when p_linear = 0.0
IIRC,
|
It should return -80.0 because its the lowest value that audio bus and AudioStreamPlayer volume should take . |
Also should i clamp the log min/max value to audio bus and AudioStreamPlayer volume. |
I think that linear2db(value) and db2linear(value) where the value is 0 should give the same result. |
db2linear is working fine only linear2db returns null on p_linear=0.0. |
We discussed in the the proposal meeting. Juan liked the idea of reversible operations. A design was suggested that changes -inf to 0 when using linear2db. (I think this is the current design?) There's a cut off constant in the editor to stop processing. I don't remember if it was -40DB or something. |
yeah that would be a better way to fix it. |
Is there any resolution to this? It also needs a rebase as this is now |
Has anything changed since #61935 (comment)? |
this is a tempt to fix linear2db returns null when p_linear=0.0.