summaryrefslogtreecommitdiffstats
path: root/gst/legacyresample/functable.h
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-01-23 12:46:28 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-01-23 12:47:19 +0100
commite4e3b44e048ddc1d7499c6108175a5f89c6273d9 (patch)
treef88b685f1b6baf849649494ec557d2ef0ef13a88 /gst/legacyresample/functable.h
parent6fec8619b597f5cc9c58d268ddd9f64ea0a94277 (diff)
downloadgst-plugins-bad-e4e3b44e048ddc1d7499c6108175a5f89c6273d9.tar.gz
gst-plugins-bad-e4e3b44e048ddc1d7499c6108175a5f89c6273d9.tar.bz2
gst-plugins-bad-e4e3b44e048ddc1d7499c6108175a5f89c6273d9.zip
Rename audioresample files and types to legacyresample
Finish the move/rename of audioresample to legacyresample to prevent any confusion.
Diffstat (limited to 'gst/legacyresample/functable.h')
-rw-r--r--gst/legacyresample/functable.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/gst/legacyresample/functable.h b/gst/legacyresample/functable.h
new file mode 100644
index 00000000..5f56e2bd
--- /dev/null
+++ b/gst/legacyresample/functable.h
@@ -0,0 +1,61 @@
+/* Resampling library
+ * Copyright (C) <2001> David Schleef <ds@schleef.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __FUNCTABLE_H__
+#define __FUNCTABLE_H__
+
+typedef void FunctableFunc (double *fx, double *dfx, double x, void *closure);
+
+typedef struct _Functable Functable;
+struct _Functable {
+ int length;
+
+ double offset;
+ double multiplier;
+
+ double inv_multiplier;
+
+ double *fx;
+ double *dfx;
+};
+
+Functable *functable_new (void);
+void functable_setup (Functable *t);
+void functable_free (Functable *t);
+
+void functable_set_length (Functable *t, int length);
+void functable_set_offset (Functable *t, double offset);
+void functable_set_multiplier (Functable *t, double multiplier);
+void functable_calculate (Functable *t, FunctableFunc func, void *closure);
+void functable_calculate_multiply (Functable *t, FunctableFunc func, void *closure);
+
+
+double functable_evaluate (Functable *t,double x);
+
+double functable_fir(Functable *t,double x0,int n,double *data,int len);
+void functable_fir2(Functable *t,double *r0, double *r1, double x0,
+ int n,double *data,int len);
+
+void functable_func_sinc(double *fx, double *dfx, double x, void *closure);
+void functable_func_boxcar(double *fx, double *dfx, double x, void *closure);
+void functable_func_hanning(double *fx, double *dfx, double x, void *closure);
+
+#endif /* __PRIVATE_H__ */
+