libg722_1
0.1.0
broadvoice/broadvoice.h
1
/*
2
* broadvoice - a library for the BroadVoice 16 and 32 codecs
3
*
4
* broadvoice.h -
5
*
6
* Adapted by Steve Underwood <steveu@coppice.org> from code which is
7
* Copyright 2000-2009 Broadcom Corporation
8
*
9
* All rights reserved.
10
*
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License version 2.1,
13
* as published by the Free Software Foundation.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License for more details.
19
*
20
* You should have received a copy of the GNU Lesser General Public
21
* License along with this program; if not, write to the Free Software
22
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
*
24
* $Id: broadvoice.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
25
*/
26
27
#if !defined(_BROADVOICE_BROADVOICE_H_)
28
#define _BROADVOICE_BROADVOICE_H_
29
30
#if defined(_M_IX86) || defined(_M_X64)
31
#if defined(BROADVOICE_EXPORTS)
32
#define BV_DECLARE(type) __declspec(dllexport) type __stdcall
33
#define BV_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
34
#define BV_DECLARE_DATA __declspec(dllexport)
35
#else
36
#define BV_DECLARE(type) __declspec(dllimport) type __stdcall
37
#define BV_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
38
#define BV_DECLARE_DATA __declspec(dllimport)
39
#endif
40
#elif defined(BROADVOICE_USE_EXPORT_CAPABILITY) && (defined(__GNUC__) || defined(__SUNCC__))
41
#define BV_DECLARE(type) __attribute__((visibility("default"))) type
42
#define BV_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
43
#define BV_DECLARE_DATA __attribute__((visibility("default")))
44
#else
45
#define BV_DECLARE(type)
/**/
type
46
#define BV_DECLARE_NONSTD(type)
/**/
type
47
#define BV_DECLARE_DATA
/**/
48
#endif
49
50
typedef
struct
bv16_encode_state_s
bv16_encode_state_t
;
51
typedef
struct
bv16_decode_state_s
bv16_decode_state_t
;
52
typedef
struct
bv32_encode_state_s
bv32_encode_state_t
;
53
typedef
struct
bv32_decode_state_s
bv32_decode_state_t
;
54
55
#define BV16_FRAME_LEN 40
56
#define BV32_FRAME_LEN 80
57
58
#if defined(__cplusplus)
59
extern
"C"
60
{
61
#endif
62
63
BV_DECLARE(
bv16_encode_state_t
*) bv16_encode_init(
bv16_encode_state_t
*s);
64
65
BV_DECLARE(
int
) bv16_encode(
bv16_encode_state_t
*cs,
66
uint8_t *out,
67
const
int16_t amp[],
68
int
len);
69
70
BV_DECLARE(
int
) bv16_encode_release(
bv16_encode_state_t
*s);
71
72
BV_DECLARE(
int
) bv16_encode_free(
bv16_encode_state_t
*s);
73
74
75
BV_DECLARE(
bv16_decode_state_t
*) bv16_decode_init(
bv16_decode_state_t
*s);
76
77
BV_DECLARE(
int
) bv16_decode(
bv16_decode_state_t
*s,
78
int16_t amp[],
79
const
uint8_t *in,
80
int
len);
81
82
BV_DECLARE(
int
) bv16_fillin(
bv16_decode_state_t
*s,
83
int16_t amp[],
84
int
len);
85
86
BV_DECLARE(
int
) bv16_decode_release(
bv16_decode_state_t
*s);
87
88
BV_DECLARE(
int
) bv16_decode_free(
bv16_decode_state_t
*s);
89
90
91
BV_DECLARE(
bv32_encode_state_t
*) bv32_encode_init(
bv32_encode_state_t
*s);
92
93
BV_DECLARE(
int
) bv32_encode(
bv32_encode_state_t
*s,
94
uint8_t *out,
95
const
int16_t amp[],
96
int
len);
97
98
BV_DECLARE(
int
) bv32_encode_release(
bv32_encode_state_t
*s);
99
100
BV_DECLARE(
int
) bv32_encode_free(
bv32_encode_state_t
*s);
101
102
103
BV_DECLARE(
bv32_decode_state_t
*) bv32_decode_init(
bv32_decode_state_t
*s);
104
105
BV_DECLARE(
int
) bv32_decode(
bv32_decode_state_t
*s,
106
int16_t amp[],
107
const
uint8_t *in,
108
int
len);
109
110
BV_DECLARE(
int
) bv32_fillin(
bv32_decode_state_t
*ds,
111
int16_t amp[],
112
int
len);
113
114
BV_DECLARE(
int
) bv32_decode_release(
bv32_decode_state_t
*s);
115
116
BV_DECLARE(
int
) bv32_decode_free(
bv32_decode_state_t
*s);
117
118
#if defined(__cplusplus)
119
}
120
#endif
121
122
#endif
123
/*- End of file ------------------------------------------------------------*/
bv16_encode_state_s
Definition:
broadvoice/private/broadvoice.h:100
bv16_decode_state_s
Definition:
broadvoice/private/broadvoice.h:71
bv32_encode_state_s
Definition:
broadvoice/private/broadvoice.h:156
bv32_decode_state_s
Definition:
broadvoice/private/broadvoice.h:128
src
broadvoice
broadvoice.h
Generated by
1.8.17