diff --git a/notes b/notes index 7a683ac..66a11f3 100644 --- a/notes +++ b/notes @@ -35,7 +35,7 @@ TODO { about-license info } - fix overrun-by-1 on sample preview + - fix overrun-by-1 on sample preview templatize svfilter and have mono version for synth use diff --git a/xybrid/data/sample.cpp b/xybrid/data/sample.cpp index 404ffb4..d545201 100644 --- a/xybrid/data/sample.cpp +++ b/xybrid/data/sample.cpp @@ -35,7 +35,7 @@ using namespace Xybrid::Data; std::array Sample::plotBetween(size_t ch, size_t start, size_t end) const { if (end < start) end = start; if (ch >= 2 || start >= data[ch].size()) return {0, 0}; - end = std::min(end, data[ch].size()); + end = std::min(end, data[ch].size()-1); float mx = -100; float mn = 100;