Commit 6fe45a5e authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Getting shared libraries to build

parent e05aaf22
......@@ -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
......
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