Skip to content
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

Rearrange manual gain table calculation to match the gain-setting code more closely. #3

Merged
merged 2 commits into from
Apr 14, 2015

Conversation

mutability
Copy link

This fixes a problem where the topmost gain (49.6dB) would be omitted,
but introduces another complication: because there is a negative step
value for mixer gain in the standard gain steps, there's a possible
gain value included in the table of gains that can actually never
be set. Ew. I don't like just dropping the last entry either since
I'm about to fix that negative mixer gain step anyway, but if you
want to do that just make gain_table_len one shorter.

code more closely.

This fixes a problem where the topmost gain would be omitted, but
introduces another complication: because there is a negative step
value for mixer gain in the standard gain steps, there's a possible
gain value included in the table of gains that can actually never
be set. Ew. I don't like just dropping the last entry either since
I'm about to fix that negative mixer gain step anyway..
This only adds to the table when the gain increases.
It's impossible to set gain values that result from a decrease
in total gain with the current gain-setting code.
@mutability
Copy link
Author

Ok, with that update it should return exactly the same table as the original hardcoded table, and it'll also work nicely with revised gain steps that have zeros for the final few mixer steps.

dl8aau added a commit that referenced this pull request Apr 14, 2015
Rearrange manual gain table calculation to match the gain-setting code more closely.
@dl8aau dl8aau merged commit a5007fb into dl8aau:master Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants