Fixes issues with multiple files defining CELT_C

This commit is contained in:
Jean-Marc Valin 2012-11-08 11:25:20 -05:00
parent 6906210cb0
commit 1ecb7eaeaf
3 changed files with 5 additions and 7 deletions

View file

@ -31,8 +31,7 @@
#include "config.h" #include "config.h"
#endif #endif
#define CELT_C #define CELT_DECODER_C
#define DECODER
#include "os_support.h" #include "os_support.h"
#include "mdct.h" #include "mdct.h"

View file

@ -31,8 +31,7 @@
#include "config.h" #include "config.h"
#endif #endif
#define CELT_C #define CELT_ENCODER_C
#define ENCODER
#include "os_support.h" #include "os_support.h"
#include "mdct.h" #include "mdct.h"

View file

@ -46,7 +46,7 @@ extern "C" {
# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT # define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT
#else #else
# define OPUS_CUSTOM_EXPORT # define OPUS_CUSTOM_EXPORT
# ifdef CELT_C # ifdef OPUS_BUILD
# define OPUS_CUSTOM_EXPORT_STATIC static inline # define OPUS_CUSTOM_EXPORT_STATIC static inline
# else # else
# define OPUS_CUSTOM_EXPORT_STATIC # define OPUS_CUSTOM_EXPORT_STATIC
@ -127,7 +127,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_crea
OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode); 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 */ /* Encoder */
/** Gets the size of an OpusCustomEncoder structure. /** Gets the size of an OpusCustomEncoder structure.
@ -237,7 +237,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode(
OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1); 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 */ /* Decoder */
/** Gets the size of an OpusCustomDecoder structure. /** Gets the size of an OpusCustomDecoder structure.