Use extern "C" as appropriate to allow use with C++

This commit is contained in:
Matt Zimmerman 2002-05-06 17:39:29 +00:00
parent 5b72e174a1
commit ce9459f4cb
6 changed files with 52 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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