From 9303354d1492e1e7280c0a69342e62a016342204 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sat, 19 Nov 2022 11:09:27 -0800 Subject: [PATCH] check also rubberband major api version --- src/modules/rubberband/filter_rbpitch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/rubberband/filter_rbpitch.cpp b/src/modules/rubberband/filter_rbpitch.cpp index b990631c7..ced784c6a 100644 --- a/src/modules/rubberband/filter_rbpitch.cpp +++ b/src/modules/rubberband/filter_rbpitch.cpp @@ -101,7 +101,7 @@ static int rbpitch_get_audio( mlt_frame frame, void **buffer, mlt_audio_format * delete s; // Create a rubberband instance RubberBandStretcher::Options options = RubberBandStretcher::OptionProcessRealTime; -#if RUBBERBAND_API_MINOR_VERSION >= 7 +#if RUBBERBAND_API_MAJOR_VERSION >= 2 && RUBBERBAND_API_MINOR_VERSION >= 7 // Use the higher quality engine if available. options |= RubberBandStretcher::OptionEngineFiner; #endif @@ -116,7 +116,7 @@ static int rbpitch_get_audio( mlt_frame frame, void **buffer, mlt_audio_format * if( pitchscale >= 0.5 && pitchscale <= 2.0 ) { // Pitch adjustment < 200% -#if RUBBERBAND_API_MINOR_VERSION < 7 +#if RUBBERBAND_API_MAJOR_VERSION <= 2 && RUBBERBAND_API_MINOR_VERSION < 7 s->setPitchOption(RubberBandStretcher::OptionPitchHighQuality); #endif s->setTransientsOption(RubberBandStretcher::OptionTransientsCrisp); @@ -126,7 +126,7 @@ static int rbpitch_get_audio( mlt_frame frame, void **buffer, mlt_audio_format * // Pitch adjustment > 200% // "HighConsistency" and "Smooth" options help to avoid large memory // consumption and crashes that can occur for large pitch adjustments. -#if RUBBERBAND_API_MINOR_VERSION < 7 +#if RUBBERBAND_API_MAJOR_VERSION <= 2 && RUBBERBAND_API_MINOR_VERSION < 7 s->setPitchOption(RubberBandStretcher::OptionPitchHighConsistency); #endif s->setTransientsOption(RubberBandStretcher::OptionTransientsSmooth);