summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/mtdm.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-05 18:02:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-05 18:02:21 +0000
commitcd528dd5eaa013fc685ce7e0c086159f0c27aafe (patch)
tree4a8a089cbcf07f6b2c3634b0f4e72c5dda8b9776 /libs/ardour/ardour/mtdm.h
parent57d05c4c318cf6bd28c95773649525690459e79f (diff)
add new files, derived from jack_delay by fons
git-svn-id: svn://localhost/ardour2/branches/3.0@5730 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/mtdm.h')
-rw-r--r--libs/ardour/ardour/mtdm.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/libs/ardour/ardour/mtdm.h b/libs/ardour/ardour/mtdm.h
new file mode 100644
index 0000000000..7fa9707554
--- /dev/null
+++ b/libs/ardour/ardour/mtdm.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ 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
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __libardour_mtdm_h__
+#define __libardour_mtdm_h__
+
+#include <cstdlib>
+#include <cstdio>
+#include <cmath>
+#include <unistd.h>
+
+class MTDM {
+ public:
+
+ MTDM ();
+
+ int process (size_t len, float *inp, float *out);
+ int resolve (void);
+ void invert (void) { _inv ^= 1; }
+ int inv (void) { return _inv; }
+ double del (void) { return _del; }
+ double err (void) { return _err; }
+
+ private:
+ class Freq {
+ public:
+ int p;
+ int f;
+ float a;
+ float xa;
+ float ya;
+ float xf;
+ float yf;
+ };
+
+ double _del;
+ double _err;
+ int _cnt;
+ int _inv;
+ Freq _freq [5];
+};
+
+#endif /* __libardour_mtdm_h__ */