summaryrefslogtreecommitdiff
path: root/sine.h
diff options
context:
space:
mode:
authorerdgeist@erdgeist.org <erdgeist@bauklotz.fritz.box>2019-07-04 23:26:09 +0200
committererdgeist@erdgeist.org <erdgeist@bauklotz.fritz.box>2019-07-04 23:26:09 +0200
commitf02dfce6e6c34b3d8a7b8a0e784b506178e331fa (patch)
tree45556e6104242d4702689760433d7321ae74ec17 /sine.h
stripdown of version 0.9
Diffstat (limited to 'sine.h')
-rw-r--r--sine.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/sine.h b/sine.h
new file mode 100644
index 0000000..5c7455c
--- /dev/null
+++ b/sine.h
@@ -0,0 +1,49 @@
1/*---------------------------------------------------------------------------*\
2
3 FILE........: sine.h
4 AUTHOR......: David Rowe
5 DATE CREATED: 1/11/94
6
7 Header file for sinusoidal analysis and synthesis functions.
8
9\*---------------------------------------------------------------------------*/
10
11/*
12 Copyright (C) 2009 David Rowe
13
14 All rights reserved.
15
16 This program is free software; you can redistribute it and/or modify
17 it under the terms of the GNU Lesser General Public License version 2.1, as
18 published by the Free Software Foundation. This program is
19 distributed in the hope that it will be useful, but WITHOUT ANY
20 WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
22 License for more details.
23
24 You should have received a copy of the GNU Lesser General Public License
25 along with this program; if not, see <http://www.gnu.org/licenses/>.
26*/
27
28#ifndef __SINE__
29#define __SINE__
30
31#include "defines.h"
32#include "comp.h"
33#include "codec2_fft.h"
34
35C2CONST c2const_create(int Fs, float framelength_ms);
36
37void make_analysis_window(C2CONST *c2const, codec2_fft_cfg fft_fwd_cfg, float w[], COMP W[]);
38float hpf(float x, float states[]);
39void dft_speech(C2CONST *c2const, codec2_fft_cfg fft_fwd_cfg, COMP Sw[], float Sn[], float w[]);
40void two_stage_pitch_refinement(C2CONST *c2const, MODEL *model, COMP Sw[]);
41void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[], int est_phase);
42float est_voicing_mbe(C2CONST *c2const, MODEL *model, COMP Sw[], COMP W[]);
43void make_synthesis_window(C2CONST *c2const, float Pn[]);
44void synthesise(int n_samp, codec2_fftr_cfg fftr_inv_cfg, float Sn_[], MODEL *model, float Pn[], int shift);
45
46#define CODEC2_RAND_MAX 32767
47int codec2_rand(void);
48
49#endif