summaryrefslogtreecommitdiff
path: root/src/libfaad/faad.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfaad/faad.h')
-rw-r--r--src/libfaad/faad.h48
1 files changed, 34 insertions, 14 deletions
diff --git a/src/libfaad/faad.h b/src/libfaad/faad.h
index 68e5bf3a6..a86128733 100644
--- a/src/libfaad/faad.h
+++ b/src/libfaad/faad.h
@@ -1,22 +1,22 @@
/*
** 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
+** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: faad.h,v 1.1 2002/07/14 23:43:01 miguelfreitas Exp $
+** $Id: faad.h,v 1.2 2002/12/16 19:00:02 miguelfreitas Exp $
**/
#ifndef __AACDEC_H__
@@ -37,19 +37,32 @@ extern "C" {
#endif
#endif
+#define FAAD2_VERSION "1.2 beta"
-#define MAIN 0
-#define LC 1
-#define SSR 2
-#define LTP 3
-#define ER_LC 17
-#define LD 23
-#define DRM_ER_LC 27 /* special object type for DRM */
+/* object types for AAC */
+#define MAIN 0
+#define LC 1
+#define SSR 2
+#define LTP 3
+#define ER_LC 17
+#define ER_LTP 19
+#define LD 23
+#define DRM_ER_LC 27 /* special object type for DRM */
+/* header types */
+#define RAW 0
+#define ADIF 1
+#define ADTS 2
+
+/* library output formats */
#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
/* A decode call can eat up to FAAD_MIN_STREAMSIZE octets per decoded channel,
so at least so much octets per channel should be available in this stream */
@@ -74,7 +87,7 @@ typedef struct faacDecFrameInfo
unsigned char error;
} faacDecFrameInfo;
-unsigned char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
+char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
faacDecHandle FAADAPI faacDecOpen();
@@ -86,6 +99,7 @@ unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
/* Init the library based on info from the AAC file (ADTS/ADIF) */
long FAADAPI faacDecInit(faacDecHandle hDecoder,
unsigned char *buffer,
+ unsigned long buffer_size,
unsigned long *samplerate,
unsigned char *channels);
@@ -94,13 +108,19 @@ char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer,
unsigned long SizeOfDecoderSpecificInfo,
unsigned long *samplerate, unsigned char *channels);
+/* Init the library for DRM */
+char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate,
+ unsigned char channels);
+
void FAADAPI faacDecClose(faacDecHandle hDecoder);
void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo,
- unsigned char *buffer);
+ unsigned char *buffer,
+ unsigned long buffer_size);
char FAADAPI AudioSpecificConfig(unsigned char *pBuffer,
+ unsigned long buffer_size,
unsigned long *samplerate,
unsigned char *channels,
unsigned char *sf_index,