From 2683c0cf1ef9e6c3ce899f0a6581b5e08c9f8420 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 13 Apr 2022 09:27:06 +0100 Subject: [PATCH] NoveltySlice: ensure frame offset is reset when win / hop changes --- include/algorithms/public/NoveltySegmentation.hpp | 1 + include/clients/rt/NoveltySliceClient.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/algorithms/public/NoveltySegmentation.hpp b/include/algorithms/public/NoveltySegmentation.hpp index 904c0c6cf..f0bef970d 100644 --- a/include/algorithms/public/NoveltySegmentation.hpp +++ b/include/algorithms/public/NoveltySegmentation.hpp @@ -33,6 +33,7 @@ class NoveltySegmentation { mNovelty.init(kernelSize, filterSize, nDims); mDebounceCount = 1; + mPeakBuffer.setZero(); } double processFrame(const RealVectorView input, double threshold, diff --git a/include/clients/rt/NoveltySliceClient.hpp b/include/clients/rt/NoveltySliceClient.hpp index aaf6763ad..5b8b0dd94 100644 --- a/include/clients/rt/NoveltySliceClient.hpp +++ b/include/clients/rt/NoveltySliceClient.hpp @@ -126,6 +126,7 @@ class NoveltySliceClient : public FluidBaseClient, mLoudness.init(windowSize, sampleRate()); } mFeature.resize(nDims); + mFrameOffset = 0; mNovelty.init(get(), get(), nDims); }