Commit 7f38906f authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Added info for properly exporting symbols

parent 31b79d19
......@@ -78,7 +78,7 @@ struct CELTEncoder {
celt_word16_t *oldBandE;
};
CELTEncoder *celt_encoder_create(const CELTMode *mode)
CELTEncoder EXPORT *celt_encoder_create(const CELTMode *mode)
{
int N, B, C;
CELTEncoder *st;
......@@ -114,7 +114,7 @@ CELTEncoder *celt_encoder_create(const CELTMode *mode)
return st;
}
void celt_encoder_destroy(CELTEncoder *st)
void EXPORT celt_encoder_destroy(CELTEncoder *st)
{
if (st == NULL)
{
......@@ -231,7 +231,7 @@ static void compute_inv_mdcts(const mdct_lookup *mdct_lookup, const celt_word16_
RESTORE_STACK;
}
int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, int nbCompressedBytes)
int EXPORT celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, int nbCompressedBytes)
{
int i, c, N, B, C, N4;
int has_pitch;
......@@ -454,7 +454,7 @@ struct CELTDecoder {
int last_pitch_index;
};
CELTDecoder *celt_decoder_create(const CELTMode *mode)
CELTDecoder EXPORT *celt_decoder_create(const CELTMode *mode)
{
int N, B, C;
CELTDecoder *st;
......@@ -484,7 +484,7 @@ CELTDecoder *celt_decoder_create(const CELTMode *mode)
return st;
}
void celt_decoder_destroy(CELTDecoder *st)
void EXPORT celt_decoder_destroy(CELTDecoder *st)
{
if (st == NULL)
{
......@@ -544,7 +544,7 @@ static void celt_decode_lost(CELTDecoder *st, short *pcm)
RESTORE_STACK;
}
int celt_decode(CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm)
int EXPORT celt_decode(CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm)
{
int i, c, N, B, C, N4;
int has_pitch;
......
......@@ -62,7 +62,7 @@ _le_32 (celt_uint32_t i)
return ret;
}
void celt_header_init(CELTHeader *header, const CELTMode *m)
void EXPORT celt_header_init(CELTHeader *header, const CELTMode *m)
{
CELT_COPY(header->codec_id, "CELT ", 8);
CELT_COPY(header->codec_version, "experimental ", 20);
......@@ -77,7 +77,7 @@ void celt_header_init(CELTHeader *header, const CELTMode *m)
header->extra_headers = 0;
}
int celt_header_to_packet(const CELTHeader *header, unsigned char *packet, celt_uint32_t size)
int EXPORT celt_header_to_packet(const CELTHeader *header, unsigned char *packet, celt_uint32_t size)
{
celt_int32_t * h;
......@@ -103,7 +103,7 @@ int celt_header_to_packet(const CELTHeader *header, unsigned char *packet, celt_
return sizeof(*header);
}
int celt_header_from_packet(const unsigned char *packet, celt_uint32_t size, CELTHeader *header)
int EXPORT celt_header_from_packet(const unsigned char *packet, celt_uint32_t size, CELTHeader *header)
{
CELT_COPY((unsigned char*)header, packet, sizeof(*header));
return sizeof(*header);
......
......@@ -50,7 +50,7 @@
#endif
int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value)
int EXPORT celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value)
{
switch (request)
{
......@@ -219,7 +219,7 @@ static void compute_allocation_table(CELTMode *mode, int res)
#endif /* STATIC_MODES */
CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int lookahead, int *error)
CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int lookahead, int *error)
{
#ifdef STATIC_MODES
const CELTMode *m = NULL;
......@@ -320,7 +320,7 @@ CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int lo
return mode;
}
void celt_mode_destroy(CELTMode *mode)
void EXPORT celt_mode_destroy(CELTMode *mode)
{
mdct_clear(&mode->mdct);
#ifndef STATIC_MODES
......
......@@ -42,6 +42,14 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef __GNUC__
#define EXPORT __attribute__ ((visibility ("default")))
#elif defined(WIN32)
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, celt_realloc and celt_free
NOTE: celt_alloc needs to CLEAR THE MEMORY */
#ifndef OVERRIDE_CELT_ALLOC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment