summaryrefslogtreecommitdiff
path: root/src/libmad/stream.h
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-04-30 18:46:58 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-04-30 18:46:58 +0000
commit2031afda7670cbca8ef59221dc95696382e73aa4 (patch)
tree9cc702a0cdf3c7616d460591e359acdace76dae7 /src/libmad/stream.h
parent7cb6e3194a3dfa77ab0f96ce9c3f160204b72d4f (diff)
downloadxine-lib-2031afda7670cbca8ef59221dc95696382e73aa4.tar.gz
xine-lib-2031afda7670cbca8ef59221dc95696382e73aa4.tar.bz2
libmad updated
CVS patchset: 1817 CVS date: 2002/04/30 18:46:58
Diffstat (limited to 'src/libmad/stream.h')
-rw-r--r--src/libmad/stream.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libmad/stream.h b/src/libmad/stream.h
index e745f5b20..b40db3197 100644
--- a/src/libmad/stream.h
+++ b/src/libmad/stream.h
@@ -1,5 +1,5 @@
/*
- * mad - MPEG audio decoder
+ * libmad - MPEG audio decoder library
* Copyright (C) 2000-2001 Robert Leslie
*
* This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: stream.h,v 1.1 2001/08/12 02:57:55 guenter Exp $
+ * $Id: stream.h,v 1.2 2002/04/30 18:46:58 miguelfreitas Exp $
*/
# ifndef LIBMAD_STREAM_H
@@ -28,6 +28,8 @@
# define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD)
enum mad_error {
+ MAD_ERROR_NONE = 0x0000, /* no error */
+
MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */
MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */
@@ -80,18 +82,19 @@ struct mad_stream {
enum {
MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */
- MAD_OPTION_HALFSAMPLERATE = 0x0002, /* generate PCM at 1/2 sample rate */
+ MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */
# if 0 /* not yet implemented */
MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */
MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */
- MAD_OPTION_SINGLECHANNEL = 0x0030, /* combine channels */
+ MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */
# endif
};
void mad_stream_init(struct mad_stream *);
void mad_stream_finish(struct mad_stream *);
-# define mad_stream_options(stream, opts) ((stream)->options = (opts))
+# define mad_stream_options(stream, opts) \
+ ((void) ((stream)->options = (opts)))
void mad_stream_buffer(struct mad_stream *,
unsigned char const *, unsigned long);
@@ -99,4 +102,6 @@ void mad_stream_skip(struct mad_stream *, unsigned long);
int mad_stream_sync(struct mad_stream *);
+char const *mad_stream_errorstr(struct mad_stream const *);
+
# endif