1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
/*
** FAAD - Freeware Advanced Audio Decoder
** Copyright (C) 2002 M. Bakker
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** $Id: decoder.h,v 1.2 2002/12/16 18:59:59 miguelfreitas Exp $
**/
#ifndef __DECODER_H__
#define __DECODER_H__
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#pragma pack(push, 8)
#ifndef FAADAPI
#define FAADAPI __cdecl
#endif
#else
#ifndef FAADAPI
#define FAADAPI
#endif
#endif
#include "bits.h"
#include "syntax.h"
#include "drc.h"
#include "specrec.h"
#include "filtbank.h"
#include "ic_predict.h"
#define FAAD_FMT_16BIT 1
#define FAAD_FMT_24BIT 2
#define FAAD_FMT_32BIT 3
#define FAAD_FMT_FLOAT 4
#define FAAD_FMT_16BIT_DITHER 5
#define FAAD_FMT_16BIT_L_SHAPE 6
#define FAAD_FMT_16BIT_M_SHAPE 7
#define FAAD_FMT_16BIT_H_SHAPE 8
int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
faacDecHandle FAADAPI faacDecOpen();
faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
faacDecConfigurationPtr config);
/* Init the library based on info from the AAC file (ADTS/ADIF) */
int32_t FAADAPI faacDecInit(faacDecHandle hDecoder,
uint8_t *buffer,
uint32_t buffer_size,
uint32_t *samplerate,
uint8_t *channels);
/* Init the library using a DecoderSpecificInfo */
int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
uint32_t SizeOfDecoderSpecificInfo,
uint32_t *samplerate, uint8_t *channels);
/* Init the library for DRM */
int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
uint8_t channels);
void FAADAPI faacDecClose(faacDecHandle hDecoder);
void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo,
uint8_t *buffer,
uint32_t buffer_size);
element *decode_sce_lfe(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo, bitfile *ld,
int16_t **spec_data, real_t **spec_coef,
uint8_t id_syn_ele);
element *decode_cpe(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo, bitfile *ld,
int16_t **spec_data, real_t **spec_coef,
uint8_t id_syn_ele);
element **raw_data_block(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
bitfile *ld, element **elements,
int16_t **spec_data, real_t **spec_coef,
program_config *pce, drc_info *drc);
#ifdef _WIN32
#pragma pack(pop)
#endif
#ifdef __cplusplus
}
#endif
#endif
|