ref: 1ecb7eaeafad60604ecb04adb25952dba6f40765
parent: 6906210cb0083f6a23acf0d34ddf576be5074f25
author: Jean-Marc Valin <[email protected]>
date: Thu Nov 8 06:25:20 EST 2012
Fixes issues with multiple files defining CELT_C
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -31,8 +31,7 @@
#include "config.h"
#endif
-#define CELT_C
-#define DECODER
+#define CELT_DECODER_C
#include "os_support.h"
#include "mdct.h"
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -31,8 +31,7 @@
#include "config.h"
#endif
-#define CELT_C
-#define ENCODER
+#define CELT_ENCODER_C
#include "os_support.h"
#include "mdct.h"
--- a/include/opus_custom.h
+++ b/include/opus_custom.h
@@ -46,7 +46,7 @@
# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT
#else
# define OPUS_CUSTOM_EXPORT
-# ifdef CELT_C
+# ifdef OPUS_BUILD
# define OPUS_CUSTOM_EXPORT_STATIC static inline
# else
# define OPUS_CUSTOM_EXPORT_STATIC
@@ -127,7 +127,7 @@
OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);
-#if defined(CELT_C) && defined(ENCODER)
+#if !defined(OPUS_BUILD) || defined(CELT_ENCODER_C)
/* Encoder */
/** Gets the size of an OpusCustomEncoder structure.
@@ -237,7 +237,7 @@
OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
-#if defined(CELT_C) && defined(DECODER)
+#if !defined(OPUS_BUILD) || defined(CELT_DECODER_C)
/* Decoder */
/** Gets the size of an OpusCustomDecoder structure.