40 #define BWLIST {75,800} 42 #define FLIST {1400,1800,1200,2200,1300,2100} 44 #define STATE_SEARCH_STARTBIT 0 45 #define STATE_SEARCH_STARTBIT2 1 46 #define STATE_SEARCH_STARTBIT3 2 47 #define STATE_GET_BYTE 3 52 retval = (int) **buffer;
58 #define IGET_SAMPLE iget_sample(&buffer, len) 67 { { 1.8229206611e-04,-7.8997325866e-01,2.2401819940e+00,-4.6751353581e+00,5.5080745712e+00,-5.0571565772e+00,2.6215820004e+00,0.0000000000e+00,
68 }, { 9.8532175289e-02,-5.6297236492e-02,3.3146713415e-01,-9.2239200436e-01,1.4844365184e+00,-2.0183258642e+00,2.0074154497e+00,0.0000000000e+00,
69 }, }, { { 1.8229206610e-04,-7.8997325866e-01,7.7191410839e-01,-2.8075643964e+00,1.6948618347e+00,-3.0367273700e+00,9.0333559408e-01,0.0000000000e+00,
70 }, { 9.8531161839e-02,-5.6297236492e-02,1.1421579050e-01,-4.8122536483e-01,4.0121072432e-01,-7.4834487567e-01,6.9170822332e-01,0.0000000000e+00,
71 }, }, { { 1.8229206611e-04,-7.8997325866e-01,2.9003821430e+00,-6.1082779024e+00,7.7169345751e+00,-6.6075999680e+00,3.3941838836e+00,0.0000000000e+00,
72 }, { 9.8539686961e-02,-5.6297236492e-02,4.2915323820e-01,-1.2609358633e+00,2.2399213250e+00,-2.9928879142e+00,2.5990173742e+00,0.0000000000e+00,
73 }, }, { { 1.8229206610e-04,-7.8997325866e-01,-7.7191410839e-01,-2.8075643964e+00,-1.6948618347e+00,-3.0367273700e+00,-9.0333559408e-01,0.0000000000e+00,
74 }, { 9.8531161839e-02,-5.6297236492e-02,-1.1421579050e-01,-4.8122536483e-01,-4.0121072432e-01,-7.4834487567e-01,-6.9170822332e-01,0.0000000000e+00,
75 }, }, { { 1.8229206611e-04,-7.8997325866e-01,2.5782298908e+00,-5.3629717478e+00,6.5890882172e+00,-5.8012914776e+00,3.0171839130e+00,0.0000000000e+00,
76 }, { 9.8534230718e-02,-5.6297236492e-02,3.8148618075e-01,-1.0848760410e+00,1.8441165168e+00,-2.4860666655e+00,2.3103384142e+00,0.0000000000e+00,
77 }, }, { { 1.8229206610e-04,-7.8997325866e-01,-3.8715051001e-01,-2.6192408538e+00,-8.3977994034e-01,-2.8329897913e+00,-4.5306444352e-01,0.0000000000e+00,
78 }, { 9.8531160936e-02,-5.6297236492e-02,-5.7284484199e-02,-4.3673866734e-01,-1.9564766257e-01,-6.2028156584e-01,-3.4692356122e-01,0.0000000000e+00,
89 { 1.3868644653e-08,-6.3283665042e-01,4.0895057217e+00,-1.1020074592e+01,1.5850766191e+01,-1.2835109292e+01,5.5477477340e+00,0.0000000000e+00,
90 }, { 3.1262119724e-03,-7.8390522307e-03,8.5209627801e-02,-4.0804129163e-01,1.1157139955e+00,-1.8767603680e+00,1.8916395224e+00,0.0000000000e+00
103 fs->
ixv[(fs->
ip + 6) & 7] = s;
105 s = (fs->
ixv[fs->
ip] + fs->
ixv[(fs->
ip + 6) & 7]) +
106 6 * (fs->
ixv[(fs->
ip + 1) & 7] + fs->
ixv[(fs->
ip + 5) & 7]) +
107 15 * (fs->
ixv[(fs->
ip + 2) & 7] + fs->
ixv[(fs->
ip + 4) & 7]) +
108 20 * fs->
ixv[(fs->
ip + 3) & 7];
110 for (i = 1, j = fs->
ip; i < 7; i++, j++) {
112 s_interim = (int64_t)(fs->
iyv[j & 7]) *
113 (int64_t)(fs->
icoefs[i]) /
115 s += (int) s_interim;
131 s = in * fs->
icoefs[0] / 256;
132 fs->
ixv[(fs->
ip + 6) & 7] = s;
134 s = (fs->
ixv[(fs->
ip + 6) & 7] - fs->
ixv[fs->
ip])
135 + 3 * (fs->
ixv[(fs->
ip + 2) & 7] - fs->
ixv[(fs->
ip + 4) & 7]);
137 for (i = 1, j = fs->
ip; i < 7; i++, j++) {
138 s_interim = (int64_t)(fs->
iyv[j & 7]) *
139 (int64_t)(fs->
icoefs[i]) /
141 s += (int) s_interim;
157 ilin2 = ((im * im) - (is * is)) / (256 * 256);
174 if ((ix * fskd->
xi0) < 0) {
191 f = (ix > 0) ? 0x80 : 0;
203 for ( i = 0 ; i < 7 ; i++ ) {
231 switch (fskd->
state) {
234 goto search_startbit2;
236 goto search_startbit3;
260 beginlenx = beginlen;
274 printf(
"xi2 = %d ", fskd->
xi2);
276 if (fskd->
xi2 < 512) {
291 printf(
"xi1 = %d ", fskd->
xi1);
298 }
while (fskd->
xi1 > 0);
305 if (fskd->
nbit < 8) {
315 for (a = n1 = 0; j; j--) {
318 buffer += (olen - *
len);
333 buffer += (olen - *
len);
349 for (j = fskd->
instop; j; j--) {
Asterisk main include file. File version handling, generic pbx functions.
static int ibpdfilter(struct filter_struct *fs, int in)
#define STATE_SEARCH_STARTBIT
int fskmodem_init(fsk_data *fskd)
int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte)
#define STATE_SEARCH_STARTBIT2
static int iget_sample(short **buffer, int *len)
static int ibpfilter(struct filter_struct *fs, int in)
static double coef_out[NBW][8]
Coefficients for output filter Coefficients table, generated by program "mkfilter" Format: coef[IDX_B...
struct filter_struct demod_filter
struct filter_struct space_filter
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static double coef_in[NF][NBW][8]
Coefficients for input filters Coefficients table, generated by program "mkfilter" mkfilter is part o...
static int get_bit_raw(fsk_data *fskd, short *buffer, int *len)
static int idemodulator(fsk_data *fskd, int *retval, int x)
#define STATE_SEARCH_STARTBIT3
struct filter_struct mark_filter