Export DLL symbols

This commit is contained in:
Chris Cannam
2021-02-09 10:13:45 +00:00
parent c23d30fc4a
commit 4be543a4b2
2 changed files with 43 additions and 26 deletions

View File

@@ -32,6 +32,13 @@ extern "C" {
#define RUBBERBAND_API_MAJOR_VERSION 2
#define RUBBERBAND_API_MINOR_VERSION 6
#undef RB_EXTERN
#ifdef _MSC_VER
#define RB_EXTERN extern __declspec(dllexport)
#else
#define RB_EXTERN extern
#endif
/**
* This is a C-linkage interface to the Rubber Band time stretcher.
*
@@ -91,52 +98,54 @@ typedef int RubberBandOptions;
struct RubberBandState_;
typedef struct RubberBandState_ *RubberBandState;
extern RubberBandState rubberband_new(unsigned int sampleRate,
RB_EXTERN RubberBandState rubberband_new(unsigned int sampleRate,
unsigned int channels,
RubberBandOptions options,
double initialTimeRatio,
double initialPitchScale);
extern void rubberband_delete(RubberBandState);
RB_EXTERN void rubberband_delete(RubberBandState);
extern void rubberband_reset(RubberBandState);
RB_EXTERN void rubberband_reset(RubberBandState);
extern void rubberband_set_time_ratio(RubberBandState, double ratio);
extern void rubberband_set_pitch_scale(RubberBandState, double scale);
RB_EXTERN void rubberband_set_time_ratio(RubberBandState, double ratio);
RB_EXTERN void rubberband_set_pitch_scale(RubberBandState, double scale);
extern double rubberband_get_time_ratio(const RubberBandState);
extern double rubberband_get_pitch_scale(const RubberBandState);
RB_EXTERN double rubberband_get_time_ratio(const RubberBandState);
RB_EXTERN double rubberband_get_pitch_scale(const RubberBandState);
extern unsigned int rubberband_get_latency(const RubberBandState);
RB_EXTERN unsigned int rubberband_get_latency(const RubberBandState);
extern void rubberband_set_transients_option(RubberBandState, RubberBandOptions options);
extern void rubberband_set_detector_option(RubberBandState, RubberBandOptions options);
extern void rubberband_set_phase_option(RubberBandState, RubberBandOptions options);
extern void rubberband_set_formant_option(RubberBandState, RubberBandOptions options);
extern void rubberband_set_pitch_option(RubberBandState, RubberBandOptions options);
RB_EXTERN void rubberband_set_transients_option(RubberBandState, RubberBandOptions options);
RB_EXTERN void rubberband_set_detector_option(RubberBandState, RubberBandOptions options);
RB_EXTERN void rubberband_set_phase_option(RubberBandState, RubberBandOptions options);
RB_EXTERN void rubberband_set_formant_option(RubberBandState, RubberBandOptions options);
RB_EXTERN void rubberband_set_pitch_option(RubberBandState, RubberBandOptions options);
extern void rubberband_set_expected_input_duration(RubberBandState, unsigned int samples);
RB_EXTERN void rubberband_set_expected_input_duration(RubberBandState, unsigned int samples);
extern unsigned int rubberband_get_samples_required(const RubberBandState);
RB_EXTERN unsigned int rubberband_get_samples_required(const RubberBandState);
extern void rubberband_set_max_process_size(RubberBandState, unsigned int samples);
extern void rubberband_set_key_frame_map(RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to);
RB_EXTERN void rubberband_set_max_process_size(RubberBandState, unsigned int samples);
RB_EXTERN void rubberband_set_key_frame_map(RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to);
extern void rubberband_study(RubberBandState, const float *const *input, unsigned int samples, int final);
extern void rubberband_process(RubberBandState, const float *const *input, unsigned int samples, int final);
RB_EXTERN void rubberband_study(RubberBandState, const float *const *input, unsigned int samples, int final);
RB_EXTERN void rubberband_process(RubberBandState, const float *const *input, unsigned int samples, int final);
extern int rubberband_available(const RubberBandState);
extern unsigned int rubberband_retrieve(const RubberBandState, float *const *output, unsigned int samples);
RB_EXTERN int rubberband_available(const RubberBandState);
RB_EXTERN unsigned int rubberband_retrieve(const RubberBandState, float *const *output, unsigned int samples);
extern unsigned int rubberband_get_channel_count(const RubberBandState);
RB_EXTERN unsigned int rubberband_get_channel_count(const RubberBandState);
extern void rubberband_calculate_stretch(RubberBandState);
RB_EXTERN void rubberband_calculate_stretch(RubberBandState);
extern void rubberband_set_debug_level(RubberBandState, int level);
extern void rubberband_set_default_debug_level(int level);
RB_EXTERN void rubberband_set_debug_level(RubberBandState, int level);
RB_EXTERN void rubberband_set_default_debug_level(int level);
#ifdef __cplusplus
}
#endif
#undef RB_EXTERN
#endif