fix: resample(): adjust trailing i

This commit is contained in:
2026-03-12 20:59:26 +01:00
parent 9aaec182a8
commit ee77180994
2 changed files with 38 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ void interp(std::vector<double>& y, std::vector<double>& x, std::vector<double>&
void resample(std::vector<double> &out, std::vector<double> &x, int beat_len) {
std::vector<double> t;
std::vector<double> i;
linspace(t, 0, (double) x.size(), beat_len, false);
linspace(t, 0, (double) (x.size()-1), beat_len, false);
linspace(i, 0, (int) (x.size()-1), (int) x.size(), false);
interp(out, t, i, x);
}