diff options
author | John Glover <j@johnglover.net> | 2013-06-22 17:52:59 +0200 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2013-06-22 17:52:59 +0200 |
commit | f10e69931e1eb9d484bc7431645529d756e19861 (patch) | |
tree | 75b2d06ec019c5ed523d872bee55b8bb86c5cbb3 /src | |
parent | 86d6069c6d735325463fda20d938bc19cf4da41b (diff) | |
download | simpl-f10e69931e1eb9d484bc7431645529d756e19861.tar.gz simpl-f10e69931e1eb9d484bc7431645529d756e19861.tar.bz2 simpl-f10e69931e1eb9d484bc7431645529d756e19861.zip |
[tests] Refactor partial tracking tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/simpl/partial_tracking.cpp | 15 | ||||
-rw-r--r-- | src/simpl/partial_tracking.h | 2 |
2 files changed, 17 insertions, 0 deletions
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(); |