aboutsummaryrefslogtreecommitdiffstats
path: root/main/libresample/src/filterkit.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-31 21:22:31 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-31 21:22:31 +0000
commit04838b9d59f12f0deb605272d784125bee52e4cb (patch)
tree823393d4498b07581162c3e5266a494aa638a45c /main/libresample/src/filterkit.h
parent9c384ade94b8670b96e11fe795ceaa5bc66ed3b9 (diff)
Merge changes from team/russell/codec_resample
This commit imports libresample for use in Asterisk. It also adds a new codec module, codec_resample. This module uses libresample to re-sample signed linear audio between 8 kHz and 16 kHz. It also provides an alternative for converting between 16 kHz G.722 and 8 kHz signed linear when using G.722, which will likely be useful as some people have complained about volume issues when the current codec_g722 converts to 8 kHz signed linear. But, to test this, you will have to disable the g722-to-slin and g722-to-slin16 translators in codec_g722.c. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95501 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/libresample/src/filterkit.h')
-rw-r--r--main/libresample/src/filterkit.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/libresample/src/filterkit.h b/main/libresample/src/filterkit.h
new file mode 100644
index 000000000..9df0ae869
--- /dev/null
+++ b/main/libresample/src/filterkit.h
@@ -0,0 +1,28 @@
+/**********************************************************************
+
+ resamplesubs.c
+
+ Real-time library interface by Dominic Mazzoni
+
+ Based on resample-1.7:
+ http://www-ccrma.stanford.edu/~jos/resample/
+
+ License: LGPL - see the file LICENSE.txt for more information
+
+**********************************************************************/
+
+/* Definitions */
+#include "resample_defs.h"
+
+/*
+ * FilterUp() - Applies a filter to a given sample when up-converting.
+ * FilterUD() - Applies a filter to a given sample when up- or down-
+ */
+
+float lrsFilterUp(float Imp[], float ImpD[], UWORD Nwing, BOOL Interp,
+ float *Xp, double Ph, int Inc);
+
+float lrsFilterUD(float Imp[], float ImpD[], UWORD Nwing, BOOL Interp,
+ float *Xp, double Ph, int Inc, double dhb);
+
+void lrsLpFilter(double c[], int N, double frq, double Beta, int Num);