Add getProcessSizeLimit to C API as well

This commit is contained in:
Chris Cannam
2023-07-25 13:31:28 +01:00
parent c69c3b7473
commit 6a41d2b902
2 changed files with 9 additions and 2 deletions

View File

@@ -29,9 +29,9 @@
extern "C" { extern "C" {
#endif #endif
#define RUBBERBAND_VERSION "3.2.1" #define RUBBERBAND_VERSION "3.3.0"
#define RUBBERBAND_API_MAJOR_VERSION 2 #define RUBBERBAND_API_MAJOR_VERSION 2
#define RUBBERBAND_API_MINOR_VERSION 7 #define RUBBERBAND_API_MINOR_VERSION 8
#undef RB_EXTERN #undef RB_EXTERN
#ifdef _MSC_VER #ifdef _MSC_VER
@@ -138,6 +138,8 @@ RB_EXTERN void rubberband_set_expected_input_duration(RubberBandState, unsigned
RB_EXTERN unsigned int rubberband_get_samples_required(const RubberBandState); RB_EXTERN unsigned int rubberband_get_samples_required(const RubberBandState);
RB_EXTERN void rubberband_set_max_process_size(RubberBandState, unsigned int samples); RB_EXTERN void rubberband_set_max_process_size(RubberBandState, unsigned int samples);
RB_EXTERN unsigned int rubberband_get_process_size_limit(RubberBandState);
RB_EXTERN void rubberband_set_key_frame_map(RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to); RB_EXTERN void rubberband_set_key_frame_map(RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to);
RB_EXTERN void rubberband_study(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);

View File

@@ -143,6 +143,11 @@ void rubberband_set_max_process_size(RubberBandState state, unsigned int samples
state->m_s->setMaxProcessSize(samples); state->m_s->setMaxProcessSize(samples);
} }
unsigned int rubberband_get_process_size_limit(RubberBandState state)
{
return state->m_s->getProcessSizeLimit();
}
void rubberband_set_key_frame_map(RubberBandState state, unsigned int keyframecount, unsigned int *from, unsigned int *to) void rubberband_set_key_frame_map(RubberBandState state, unsigned int keyframecount, unsigned int *from, unsigned int *to)
{ {
std::map<size_t, size_t> kfm; std::map<size_t, size_t> kfm;