1 /*
2  *	epos/src/tdpsyn.h
3  * 	(c) 2000-2002 Petr Horak, horak@petr.cz
4  * 	(c) 2001-2002 Jirka Hanika, geo@cuni.cz
5  *
6  *	tdpsyn version 2.5 (20.9.2002)
7  *
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version.
12 
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License in doc/COPYING for more details.
17  *
18  *
19  */
20 
21 #ifndef	EPOS_TDP_H
22 #define	EPOS_TDP_H
23 
24 #define LPC_PROS_ORDER 4
25 #define MAX_OFILT_ORDER 9
26 
27 const double pii = 3.141592653589793;
28 
29 int hamkoe(int winlen, double *data);
30 int median(int lold, int lact, int lnext, int ibonus);
31 
32 class tdpsyn : public synth
33 {
34    private:
35 	SAMPLE *tdp_buff;
36 	SAMPLE *out_buff;
37 	int *ppulses;
38 	int *diph_offs;
39 	int *diph_len;
40 	int difpos;
41 	uint16_t *wwin;
42 	double lpfilt[LPC_PROS_ORDER];
43 	double ofilt[MAX_OFILT_ORDER];
44 	double smoothfilt[MAX_OFILT_ORDER];
45 	int lppitch;
46 	int lpestep;
47 	int lppstep;
48 	unsigned int sigpos;
49 	int basef0;
50 	int filtf0;
51 
52 	file *tdi;
53 
54 	int average_pitch(int offs, int len);
55 
56 	int max_frame;
57    public:
58 	tdpsyn(voice *);
59 	virtual ~tdpsyn(void);
60 	void synseg(voice *v, segment d, wavefm *w);
61 };
62 
63 #endif		// EPOS_TDP_H
64