Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/spandsp-sim/spandsp/test_utils.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
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 * $Id: test_utils.h,v 1.9 2009/05/31 14:47:10 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_TEST_UTILS_H_) | |
31 #define _TEST_UTILS_H_ | |
32 | |
33 #include <sndfile.h> | |
34 | |
35 enum | |
36 { | |
37 MUNGE_CODEC_NONE = 0, | |
38 MUNGE_CODEC_ALAW, | |
39 MUNGE_CODEC_ULAW, | |
40 MUNGE_CODEC_G726_40K, | |
41 MUNGE_CODEC_G726_32K, | |
42 MUNGE_CODEC_G726_24K, | |
43 MUNGE_CODEC_G726_16K, | |
44 }; | |
45 | |
46 typedef struct codec_munge_state_s codec_munge_state_t; | |
47 | |
48 typedef struct complexify_state_s complexify_state_t; | |
49 | |
50 #ifdef __cplusplus | |
51 extern "C" { | |
52 #endif | |
53 | |
54 SPAN_DECLARE(complexify_state_t *) complexify_init(void); | |
55 | |
56 SPAN_DECLARE(void) complexify_release(complexify_state_t *s); | |
57 | |
58 SPAN_DECLARE(complexf_t) complexify(complexify_state_t *s, int16_t amp); | |
59 | |
60 SPAN_DECLARE(void) fft(complex_t data[], int len); | |
61 | |
62 SPAN_DECLARE(void) ifft(complex_t data[], int len); | |
63 | |
64 SPAN_DECLARE(codec_munge_state_t *) codec_munge_init(int codec, int info); | |
65 | |
66 SPAN_DECLARE(void) codec_munge_release(codec_munge_state_t *s); | |
67 | |
68 SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len); | |
69 | |
70 SPAN_DECLARE(SNDFILE *) sf_open_telephony_read(const char *name, int channels); | |
71 | |
72 SPAN_DECLARE(SNDFILE *) sf_open_telephony_write(const char *name, int channels); | |
73 | |
74 #ifdef __cplusplus | |
75 } | |
76 #endif | |
77 | |
78 #endif | |
79 /*- End of file ------------------------------------------------------------*/ |