summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/pi_controller.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-01 16:50:12 +0000
committerDavid Robillard <d@drobilla.net>2011-06-01 16:50:12 +0000
commita473d630eb165272992e90f8d854b1d66ec0be63 (patch)
treed0d027d4e53cb3883f4098c4736651d0ae89c19a /libs/ardour/ardour/pi_controller.h
parenta46cea06e29bfdb18e0199a665caf5a34d388968 (diff)
Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/pi_controller.h')
-rw-r--r--libs/ardour/ardour/pi_controller.h94
1 files changed, 46 insertions, 48 deletions
diff --git a/libs/ardour/ardour/pi_controller.h b/libs/ardour/ardour/pi_controller.h
index a118fd739f..bcbc81701a 100644
--- a/libs/ardour/ardour/pi_controller.h
+++ b/libs/ardour/ardour/pi_controller.h
@@ -1,11 +1,11 @@
/*
Copyright (C) 2008 Torben Hohn
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -22,63 +22,61 @@
#include "ardour/types.h"
class PIController {
+public:
+ PIController (double resample_factor, int fir_size);
+ ~PIController();
+
+ void reset (double resample_factor) {
+ resample_mean = resample_factor;
+ static_resample_factor = resample_factor;
+ out_of_bounds ();
+ }
- public:
- PIController (double resample_factor, int fir_size);
- ~PIController();
-
- void reset (double resample_factor) {
- resample_mean = resample_factor;
- static_resample_factor = resample_factor;
- out_of_bounds ();
- }
-
- double get_ratio (int fill_level, int period_size);
- void out_of_bounds();
-
- public:
- double resample_mean;
- double static_resample_factor;
- double* offset_array;
- double* window_array;
- int offset_differential_index;
- double offset_integral;
- double catch_factor;
- double catch_factor2;
- double pclamp;
- double controlquant;
- int smooth_size;
- double smooth_offset;
- double current_resample_factor;
- bool fir_empty;
+ double get_ratio (int fill_level, int period_size);
+ void out_of_bounds();
+
+public:
+ double resample_mean;
+ double static_resample_factor;
+ double* offset_array;
+ double* window_array;
+ int offset_differential_index;
+ double offset_integral;
+ double catch_factor;
+ double catch_factor2;
+ double pclamp;
+ double controlquant;
+ int smooth_size;
+ double smooth_offset;
+ double current_resample_factor;
+ bool fir_empty;
};
#define ESTIMATOR_SIZE 16
class PIChaser {
- public:
- PIChaser();
- ~PIChaser();
+public:
+ PIChaser();
+ ~PIChaser();
- double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
- void reset();
- framepos_t want_locate() { return want_locate_val; }
+ double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
+ void reset();
+ framepos_t want_locate() { return want_locate_val; }
- private:
- PIController *pic;
- framepos_t realtime_stamps[ESTIMATOR_SIZE];
- framepos_t chasetime_stamps[ESTIMATOR_SIZE];
- int array_index;
- framepos_t want_locate_val;
+private:
+ PIController *pic;
+ framepos_t realtime_stamps[ESTIMATOR_SIZE];
+ framepos_t chasetime_stamps[ESTIMATOR_SIZE];
+ int array_index;
+ framepos_t want_locate_val;
- void feed_estimator( framepos_t realtime, framepos_t chasetime );
- double get_estimate();
+ void feed_estimator( framepos_t realtime, framepos_t chasetime );
+ double get_estimate();
- double speed;
+ double speed;
- double speed_threshold;
- framepos_t pos_threshold;
+ double speed_threshold;
+ framepos_t pos_threshold;
};
-
#endif /* __libardour_pi_controller__ */