]> git.rkrishnan.org Git - dttsp.git/blob - jDttSP/fm_demod.h
Initial revision
[dttsp.git] / jDttSP / fm_demod.h
1 /* fm_demod.h */
2
3 #ifndef _fm_demod_h
4 #define _fm_demod_h
5
6 #include <fromsys.h>
7 #include <banal.h>
8 #include <splitfields.h>
9 #include <datatypes.h>
10 #include <bufvec.h>
11 #include <cxops.h>
12 #include <fastrig.h>
13 #include <update.h>
14 #include <lmadf.h>
15 #include <fftw.h>
16 #include <ovsv.h>
17 #include <filter.h>
18 #include <oscillator.h>
19 #include <chap.h>
20
21 typedef
22 struct _fm_demod {
23   int size;
24   CXB ibuf, obuf;
25   struct {
26     REAL alpha, beta;
27     struct { REAL f, l, h; } freq;
28     REAL phs;
29     struct { REAL alpha; } iir;
30     COMPLEX delay;
31   } pll;
32
33   REAL lock, afc, cvt;
34 } FMDDesc, *FMD;
35
36 extern void FMDemod(FMD fm);
37 extern FMD newFMD(REAL samprate,
38                   REAL f_initial,
39                   REAL f_lobound,
40                   REAL f_hibound,
41                   REAL f_bandwid,
42                   int size,
43                   COMPLEX *ivec,
44                   COMPLEX *ovec,
45                   char *tag);
46 extern void delFMD(FMD fm);
47
48 #ifndef TWOPI
49 #define TWOPI (2.0*M_PI)
50 #endif
51 #ifndef CvtMod2Freq
52 #define CvtMod2Freq 0.25
53 #endif
54
55 #endif