2002-09-18 20:56:42 +00:00
|
|
|
|
|
|
|
/* This file is an attempt to hack compatibility between the
|
|
|
|
* FLAC API version used in the code in this directory
|
|
|
|
* (currently 1.0.3) and older versions of FLAC, particularly
|
|
|
|
* 1.0.2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FLAC_COMPAT_H_
|
|
|
|
#define _FLAC_COMPAT_H_
|
|
|
|
|
2002-10-20 00:51:51 +00:00
|
|
|
#ifndef VERSION
|
|
|
|
#define VERSION bogus
|
|
|
|
#endif
|
2002-09-18 20:56:42 +00:00
|
|
|
#include <FLAC/all.h>
|
|
|
|
|
|
|
|
/* FIXME when there's a autoconf symbol */
|
|
|
|
#ifndef FLAC_VERSION
|
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
#ifndef FLAC__VERSION_STRING /* removed in 1.0.4 */
|
2002-10-11 01:04:10 +00:00
|
|
|
#define FLAC_VERSION 0x010004
|
|
|
|
#else
|
2002-09-18 20:56:42 +00:00
|
|
|
#ifdef FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE
|
|
|
|
#define FLAC_VERSION 0x010003
|
|
|
|
#else
|
|
|
|
#define FLAC_VERSION 0x010002
|
|
|
|
#endif
|
2002-10-11 01:04:10 +00:00
|
|
|
#endif
|
2002-09-18 20:56:42 +00:00
|
|
|
|
|
|
|
#endif /* !defined(FLAC_VERSION) */
|
|
|
|
|
2002-10-20 00:51:51 +00:00
|
|
|
|
2002-10-11 01:04:10 +00:00
|
|
|
#if FLAC_VERSION < 0x010004
|
|
|
|
#define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK
|
|
|
|
#define FLAC__seekable_stream_decoder_process_single(a) \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__seekable_stream_decoder_process_one_frame(a)
|
2002-10-11 01:04:10 +00:00
|
|
|
#endif /* FLAC_VERSION < 0x010004 */
|
|
|
|
|
2002-09-18 20:56:42 +00:00
|
|
|
#if FLAC_VERSION < 0x010003
|
|
|
|
|
|
|
|
#define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__STREAM_DECODER_ERROR_LOST_SYNC
|
2002-09-18 20:56:42 +00:00
|
|
|
#define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__STREAM_DECODER_ERROR_BAD_HEADER
|
2002-09-18 20:56:42 +00:00
|
|
|
#define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH
|
2002-09-18 20:56:42 +00:00
|
|
|
#define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__STREAM_DECODER_WRITE_ABORT
|
2002-09-18 20:56:42 +00:00
|
|
|
#define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \
|
2005-12-06 19:44:58 +00:00
|
|
|
FLAC__STREAM_DECODER_WRITE_CONTINUE
|
2002-09-18 20:56:42 +00:00
|
|
|
|
|
|
|
#define FLAC__StreamMetadata FLAC__StreamMetaData
|
|
|
|
|
|
|
|
#endif /* FLAC_VERSION < 0x010003 */
|
|
|
|
|
2002-09-19 15:17:02 +00:00
|
|
|
#endif /* _FLAC_COMPAT_H_ */
|