spandsp  0.0.6
test_utils.h
Go to the documentation of this file.
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * test_utils.h - Utility routines for module tests.
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2006 Steve Underwood
9  *
10  * All rights reserved.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 2.1,
14  * as published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 /*! \file */
27 
28 #if !defined(_TEST_UTILS_H_)
29 #define _TEST_UTILS_H_
30 
31 #include <sndfile.h>
32 
33 enum
34 {
35  MUNGE_CODEC_NONE = 0,
36  MUNGE_CODEC_ALAW,
37  MUNGE_CODEC_ULAW,
38  MUNGE_CODEC_G726_40K,
39  MUNGE_CODEC_G726_32K,
40  MUNGE_CODEC_G726_24K,
41  MUNGE_CODEC_G726_16K,
42 };
43 
45 
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 SPAN_DECLARE(complexify_state_t *) complexify_init(void);
53 
54 SPAN_DECLARE(void) complexify_release(complexify_state_t *s);
55 
56 SPAN_DECLARE(complexf_t) complexify(complexify_state_t *s, int16_t amp);
57 
58 SPAN_DECLARE(void) fft(complex_t data[], int len);
59 
60 SPAN_DECLARE(void) ifft(complex_t data[], int len);
61 
62 SPAN_DECLARE(codec_munge_state_t *) codec_munge_init(int codec, int info);
63 
64 SPAN_DECLARE(void) codec_munge_release(codec_munge_state_t *s);
65 
66 SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len);
67 
68 SPAN_DECLARE(SNDFILE *) sf_open_telephony_read(const char *name, int channels);
69 
70 SPAN_DECLARE(SNDFILE *) sf_open_telephony_write(const char *name, int channels);
71 
72 SPAN_DECLARE(int) sf_close_telephony(SNDFILE *handle);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
79 /*- End of file ------------------------------------------------------------*/
Definition: complex.h:53
Definition: test_utils.c:62
Definition: complex.h:42
Definition: test_utils.c:53