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

Fix channel mismatch during normalization #126

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Conversation

damster101
Copy link
Contributor

Previously, all channels in file b were normalized to the second channel in file a, instead of the correct, corresponding channel. This commit fixes that.

Previously, all channels in file b were normalized to the second channel in file a, instead of the correct, corresponding channel. This commit fixes that.
Copy link

google-cla bot commented Aug 25, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@@ -246,7 +246,7 @@ int Main(int argc, char* argv[]) {
for (size_t channel_index = 0; channel_index < file_b->Info().channels;
++channel_index) {
const EnergyAndMaxAbsAmplitude new_energy_and_max_abs_amplitude =
NormalizeAmplitude(file_a_max_abs_amplitude,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, but now you can remove file_a_max_abs_amplitude completely, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I do think so. Good catch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

If you handle https://opensource.google/documentation/reference/cla, I can patch this PR to remove the variable completely if you don't want to do it yourself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to patch the PR myself, and I think it worked. Learning a lot here :)

@zond zond enabled auto-merge (rebase) August 27, 2024 10:10
@zond
Copy link
Collaborator

zond commented Aug 27, 2024

Thanks! It'll merge once the tests have passed.

@damster101
Copy link
Contributor Author

Why doesn't the build check complete...

@damster101
Copy link
Contributor Author

oops, now someone has to approve again... thought merging with main might trigger the build check to go through

@zond
Copy link
Collaborator

zond commented Oct 14, 2024

It's running now - let's hope it works :D

@zond zond merged commit 8b64aaf into google:main Oct 14, 2024
2 checks passed
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