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

Fixing ResampleLinearSpectrum method in spectrum.cpp #249

Merged
merged 1 commit into from
Oct 12, 2019
Merged

Conversation

Kapsler
Copy link
Contributor

@Kapsler Kapsler commented Jul 4, 2019

I debugged and tested this with VS2019 16.1.3.

The problem was an index out of bounds problem where end would be -1.
This worked on all Configurations but "Release" for me. Somehow the compiler flag /Ob (Inline Function Expansion) on level 2 did something different than on level 1. (Test was working on level 1)
The access to lambdaIn[-1] returned -nan in "Release" (with /Ob2) but an tiny tiny value in all other Configurations.
I just made sure that end should never be smaller than null. Now all tests seem to work.

I didn't investigate further what the EXACT problem was, this would take too long for me now. If anyone knows the itty bitty details, please let me know.

Cheers,
Stefan

@mmp mmp merged commit c88a7ce into mmp:master Oct 12, 2019
@mmp
Copy link
Owner

mmp commented Oct 12, 2019

Thanks!

I think this was the problem (a few lines up...)

        if (lambda - delta < lambdaIn[0])
            // Virtual sample at the start, as described above.
            start = -1;

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