feat: StepDetector update FPS, more FPS fixes
This commit is contained in:
@@ -94,8 +94,8 @@ protected:
|
||||
std::vector<bool> goods;
|
||||
|
||||
public:
|
||||
DebugRunningQuality(): lockedAt(-1), locked(false) {}
|
||||
explicit DebugRunningQuality(bool disableSsf): RunningQuality(disableSsf), locked(false) {}
|
||||
DebugRunningQuality(double fps): RunningQuality(fps), lockedAt(-1), locked(false) {}
|
||||
explicit DebugRunningQuality(double fps, bool disableSsf): RunningQuality(fps, disableSsf), locked(false) {}
|
||||
virtual ~DebugRunningQuality() {}
|
||||
bool isLocked() { return locked; }
|
||||
std::vector<double> getCorrs() { return corrs; }
|
||||
@@ -126,7 +126,8 @@ TEST(SignalTest, resample_same_len) {
|
||||
*/
|
||||
|
||||
TEST(SignalTest, RunningQuality_t1) {
|
||||
DebugRunningQuality sqi(true);
|
||||
double fps = 60.0;
|
||||
DebugRunningQuality sqi(fps, true);
|
||||
std::vector a {0.0, 0.3, 0.9, 1.0, 0.7, 0.5, 0.1};
|
||||
std::vector b {0.0, 0.3, 0.9, 1.0, 0.5, 0.5, 0.1};
|
||||
std::vector c {0.0, 0.3, 0.9, 1.0, 0.9, 0.5, 0.1};
|
||||
@@ -194,7 +195,7 @@ TEST(SignalTest, RunningQuality_t2) {
|
||||
|
||||
// Debug SQI
|
||||
|
||||
DebugRunningQuality sqi;
|
||||
DebugRunningQuality sqi(fps);
|
||||
|
||||
std::vector<double> beat_buf;
|
||||
std::vector<double> ssf_buf;
|
||||
|
||||
@@ -25,7 +25,7 @@ TEST(StepDetector, t1_sub_sample_resolution) {
|
||||
// feed for actual test
|
||||
for (size_t i = 0; i < N; i++) {
|
||||
const auto a_i = static_cast<float>(signal[i]);
|
||||
det.filter(ts, std::vector<float> {0.0f, a_i, 0.0f});
|
||||
det.filter(ts * 1e9, std::vector<float> {0.0f, a_i, 0.0f});
|
||||
ts += 1.0 / fps;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user