diff --git a/src/opus.h b/src/opus.h index c328b97d68e94e77990b2eeb775333cf180a4495..1cf61cf1e70cbc5b7f6ce631f286cdf36f676f56 100644 --- a/src/opus.h +++ b/src/opus.h @@ -32,7 +32,7 @@ extern "C" { #endif -#if defined(__GNUC__) && defined(CELT_BUILD) +#if defined(__GNUC__) && defined(OPUS_BUILD) #define EXPORT __attribute__ ((visibility ("default"))) #elif defined(WIN32) #define EXPORT __declspec(dllexport) @@ -133,36 +133,36 @@ extern "C" { typedef struct OpusEncoder OpusEncoder; typedef struct OpusDecoder OpusDecoder; -OpusEncoder *opus_encoder_create(int Fs, int channels); +EXPORT OpusEncoder *opus_encoder_create(int Fs, int channels); /* returns length of data payload (in bytes) */ -int opus_encode(OpusEncoder *st, const short *pcm, int frame_size, +EXPORT int opus_encode(OpusEncoder *st, const short *pcm, int frame_size, unsigned char *data, int max_data_bytes); -void opus_encoder_destroy(OpusEncoder *st); +EXPORT void opus_encoder_destroy(OpusEncoder *st); -int opus_encoder_ctl(OpusEncoder *st, int request, ...); +EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...); -OpusDecoder *opus_decoder_create(int Fs, int channels); +EXPORT OpusDecoder *opus_decoder_create(int Fs, int channels); /* returns (CELT) error code */ -int opus_decode(OpusDecoder *st, const unsigned char *data, int len, +EXPORT int opus_decode(OpusDecoder *st, const unsigned char *data, int len, short *pcm, int frame_size, int decode_fec); -int opus_decoder_ctl(OpusDecoder *st, int request, ...); +EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...); -void opus_decoder_destroy(OpusDecoder *st); +EXPORT void opus_decoder_destroy(OpusDecoder *st); -int opus_packet_get_bandwidth(const unsigned char *data); -int opus_packet_get_samples_per_frame(const unsigned char *data, int Fs); -int opus_packet_get_nb_channels(const unsigned char *data); -int opus_packet_get_nb_frames(const unsigned char packet[], int len); -int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], int len); +EXPORT int opus_packet_get_bandwidth(const unsigned char *data); +EXPORT int opus_packet_get_samples_per_frame(const unsigned char *data, int Fs); +EXPORT int opus_packet_get_nb_channels(const unsigned char *data); +EXPORT int opus_packet_get_nb_frames(const unsigned char packet[], int len); +EXPORT int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], int len); #if OPUS_TEST_RANGE_CODER_STATE -int opus_encoder_get_final_range(OpusEncoder *st); -int opus_decoder_get_final_range(OpusDecoder *st); +EXPORT int opus_encoder_get_final_range(OpusEncoder *st); +EXPORT int opus_decoder_get_final_range(OpusDecoder *st); #endif