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_
13 /* FIXME when there's a autoconf symbol */
16 #ifndef FLAC__STREAM_ENCODER_WRITE_OK
17 #define FLAC_VERSION 0x010004
19 #ifdef FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE
20 #define FLAC_VERSION 0x010003
22 #define FLAC_VERSION 0x010002
26 #endif /* !defined(FLAC_VERSION) */
28 #if FLAC_VERSION < 0x010004
29 #define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK
30 #define FLAC__seekable_stream_decoder_process_single(a) \
31 FLAC__seekable_stream_decoder_process_one_frame(a)
32 #endif /* FLAC_VERSION < 0x010004 */
34 #if FLAC_VERSION < 0x010003
36 #define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \
37 FLAC__STREAM_DECODER_ERROR_LOST_SYNC
38 #define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \
39 FLAC__STREAM_DECODER_ERROR_BAD_HEADER
40 #define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \
41 FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH
42 #define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \
43 FLAC__STREAM_DECODER_WRITE_ABORT
44 #define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \
45 FLAC__STREAM_DECODER_WRITE_CONTINUE
47 #define FLAC__StreamMetadata FLAC__StreamMetaData
49 #endif /* FLAC_VERSION < 0x010003 */
51 #endif /* _FLAC_COMPAT_H_ */