From ce9459f4cb4b1203c090a09c7641d6bb7d7632e3 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Mon, 6 May 2002 17:39:29 +0000 Subject: [PATCH] Use extern "C" as appropriate to allow use with C++ --- include/FLAC/file_decoder.h | 8 ++++++++ include/FLAC/format.h | 8 ++++++++ include/FLAC/seek_table.h | 9 +++++++++ include/FLAC/seekable_stream_decoder.h | 9 +++++++++ include/FLAC/stream_decoder.h | 9 +++++++++ include/FLAC/stream_encoder.h | 9 +++++++++ 6 files changed, 52 insertions(+) diff --git a/include/FLAC/file_decoder.h b/include/FLAC/file_decoder.h index 7c0028d..151c75b 100644 --- a/include/FLAC/file_decoder.h +++ b/include/FLAC/file_decoder.h @@ -22,6 +22,10 @@ #include "stream_decoder.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { FLAC__FILE_DECODER_OK = 0, FLAC__FILE_DECODER_SEEKING, /*@@@ NOTE: unused; remove this in the next minor-version */ @@ -134,4 +138,8 @@ FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decode FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/FLAC/format.h b/include/FLAC/format.h index e95f5f3..2d75688 100644 --- a/include/FLAC/format.h +++ b/include/FLAC/format.h @@ -22,6 +22,10 @@ #include "ordinals.h" +#ifdef __cplusplus +extern "C" { +#endif + /* changing the following values to be higher will break the framing and hence the stream format, so DON'T! */ #define FLAC__MIN_BLOCK_SIZE (16u) #define FLAC__MAX_BLOCK_SIZE (65535u) @@ -504,4 +508,8 @@ extern const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /* = 24 bits */ */ FLAC__bool FLAC__format_is_valid_sample_rate(unsigned sample_rate); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/FLAC/seek_table.h b/include/FLAC/seek_table.h index 89e1037..01f0593 100644 --- a/include/FLAC/seek_table.h +++ b/include/FLAC/seek_table.h @@ -22,6 +22,15 @@ #include "format.h" +#ifdef __cplusplus +extern "C" { +#endif + + FLAC__bool FLAC__seek_table_is_valid(const FLAC__StreamMetaData_SeekTable *seek_table); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/FLAC/seekable_stream_decoder.h b/include/FLAC/seekable_stream_decoder.h index 6511d5d..ec308c8 100644 --- a/include/FLAC/seekable_stream_decoder.h +++ b/include/FLAC/seekable_stream_decoder.h @@ -22,6 +22,11 @@ #include "stream_decoder.h" +#ifdef __cplusplus +extern "C" { +#endif + + typedef enum { FLAC__SEEKABLE_STREAM_DECODER_OK = 0, FLAC__SEEKABLE_STREAM_DECODER_SEEKING, @@ -164,4 +169,8 @@ FLAC__bool FLAC__seekable_stream_decoder_process_remaining_frames(FLAC__Seekable FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/FLAC/stream_decoder.h b/include/FLAC/stream_decoder.h index 41c9319..dd3e209 100644 --- a/include/FLAC/stream_decoder.h +++ b/include/FLAC/stream_decoder.h @@ -22,6 +22,11 @@ #include "format.h" +#ifdef __cplusplus +extern "C" { +#endif + + typedef enum { FLAC__STREAM_DECODER_SEARCH_FOR_METADATA = 0, FLAC__STREAM_DECODER_READ_METADATA, @@ -161,4 +166,8 @@ FLAC__bool FLAC__stream_decoder_process_metadata(FLAC__StreamDecoder *decoder); FLAC__bool FLAC__stream_decoder_process_one_frame(FLAC__StreamDecoder *decoder); FLAC__bool FLAC__stream_decoder_process_remaining_frames(FLAC__StreamDecoder *decoder); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/FLAC/stream_encoder.h b/include/FLAC/stream_encoder.h index 3512353..4c905b7 100644 --- a/include/FLAC/stream_encoder.h +++ b/include/FLAC/stream_encoder.h @@ -22,6 +22,11 @@ #include "format.h" +#ifdef __cplusplus +extern "C" { +#endif + + typedef enum { FLAC__STREAM_ENCODER_OK = 0, FLAC__STREAM_ENCODER_INVALID_CALLBACK, @@ -190,4 +195,8 @@ void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder); FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 *buf[], unsigned samples); FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buf[], unsigned samples); +#ifdef __cplusplus +} +#endif + #endif -- 2.7.4