2 /* This file is an attempt to hack compatibility between the
3 * FLAC API version used in the code in this directory
4 * (currently 1.0.3) and older versions of FLAC, particularly
8 #ifndef _FLAC_COMPAT_H_
9 #define _FLAC_COMPAT_H_
16 /* FIXME when there's a autoconf symbol */
19 #ifndef FLAC__VERSION_STRING /* removed in 1.0.4 */
20 #define FLAC_VERSION 0x010004
22 #ifdef FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE
23 #define FLAC_VERSION 0x010003
25 #define FLAC_VERSION 0x010002
29 #endif /* !defined(FLAC_VERSION) */
32 #if FLAC_VERSION < 0x010004
33 #define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK
34 #define FLAC__seekable_stream_decoder_process_single(a) \
35 FLAC__seekable_stream_decoder_process_one_frame(a)
36 #endif /* FLAC_VERSION < 0x010004 */
38 #if FLAC_VERSION < 0x010003
40 #define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \
41 FLAC__STREAM_DECODER_ERROR_LOST_SYNC
42 #define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \
43 FLAC__STREAM_DECODER_ERROR_BAD_HEADER
44 #define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \
45 FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH
46 #define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \
47 FLAC__STREAM_DECODER_WRITE_ABORT
48 #define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \
49 FLAC__STREAM_DECODER_WRITE_CONTINUE
51 #define FLAC__StreamMetadata FLAC__StreamMetaData
53 #endif /* FLAC_VERSION < 0x010003 */
55 #endif /* _FLAC_COMPAT_H_ */