From f10e69931e1eb9d484bc7431645529d756e19861 Mon Sep 17 00:00:00 2001 From: John Glover Date: Sat, 22 Jun 2013 17:52:59 +0200 Subject: [tests] Refactor partial tracking tests. --- src/simpl/partial_tracking.cpp | 15 +++++++++++++++ src/simpl/partial_tracking.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'src') diff --git a/src/simpl/partial_tracking.cpp b/src/simpl/partial_tracking.cpp index f34d658..9f2ad19 100644 --- a/src/simpl/partial_tracking.cpp +++ b/src/simpl/partial_tracking.cpp @@ -267,6 +267,21 @@ void SMSPartialTracking::harmonic(bool is_harmonic) { sms_allocFrameH(&_header, &_data); } +double SMSPartialTracking::default_fundamental() { + return _analysis_params.fDefaultFundamental; +} + +void SMSPartialTracking::default_fundamental(double new_default_fundamental) { + sms_freeAnalysis(&_analysis_params); + sms_freeFrame(&_data); + + _analysis_params.fDefaultFundamental = new_default_fundamental; + + sms_initAnalysis(&_analysis_params); + sms_fillHeader(&_header, &_analysis_params); + sms_allocFrameH(&_header, &_data); +} + int SMSPartialTracking::max_frame_delay() { return _analysis_params.iMaxDelayFrames; } diff --git a/src/simpl/partial_tracking.h b/src/simpl/partial_tracking.h index fd143ee..e81242f 100644 --- a/src/simpl/partial_tracking.h +++ b/src/simpl/partial_tracking.h @@ -104,6 +104,8 @@ class SMSPartialTracking : public PartialTracking { void realtime(bool is_realtime); bool harmonic(); void harmonic(bool is_harmonic); + double default_fundamental(); + void default_fundamental(double new_default_fundamental); int max_frame_delay(); void max_frame_delay(int new_max_frame_delay); int analysis_delay(); -- cgit v1.2.3