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 a bug in waveform util #218

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Fix a bug in waveform util #218

merged 3 commits into from
Jan 7, 2025

Conversation

tannerbk
Copy link
Contributor

This check does not work when windowStart < 0.
if (windowStart >= waveform.size())

// Make sure not to integrate past the end of the waveform
windowEnd = (windowEnd > waveform.size()) ? waveform.size() : windowEnd;
// Make sure not to integrate before the waveform starts
windowStart = (windowStart < 0) ? 0 : windowStart;

if (windowStart >= waveform.size()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can have a more useful check now using windowEnd

@JamesJieranShen
Copy link
Contributor

@rpitelka take a look?

@rpitelka
Copy link
Contributor

Looks good to me!

@tannerbk tannerbk merged commit 6084bc4 into rat-pac:main Jan 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants