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
44
typedef
struct
codec_munge_state_s
codec_munge_state_t
;
45
46
typedef
struct
complexify_state_s
complexify_state_t
;
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 ------------------------------------------------------------*/
complexf_t
Definition:
complex.h:43
g726_decode
int g726_decode(g726_state_t *s, int16_t amp[], const uint8_t g726_data[], int g726_bytes)
Definition:
g726.c:1071
g726_state_s
Definition:
private/g726.h:39
complexf_t::im
float im
Imaginary part.
Definition:
complex.h:47
g726_init
g726_state_t * g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing)
Definition:
g726.c:998
codec_munge_state_s
Definition:
test_utils.c:54
complexify_state_s
Definition:
test_utils.c:63
spandsp-sim.h
complex_t
Definition:
complex.h:54
complexf_t::re
float re
Real part.
Definition:
complex.h:45
g726_encode
int g726_encode(g726_state_t *s, uint8_t g726_data[], const int16_t amp[], int len)
Definition:
g726.c:1127
spandsp-sim
spandsp
test_utils.h
Generated by
1.8.20