I’m trying to enable Rubberband support, both in my own TE project, and also in the PitchAndTimeDemo, but I’m getting build errors on Windows. I’m using Rubberband 2.0.1.
I’ve tried both compiling directly from source within the project via TRACKTION_BUILD_RUBBERBAND as well as linking to a static library that I built from Rubberband source. In both cases I seem to get the same errors.
The files producing the errors are:
- StretcherChannelData.cpp
- StretcherImpl.cpp
- StretcherProcess.cpp
- tracktion_TimeStretch.cpp
And the errors include:
- Error C2589 ‘(’: illegal token on right side of ‘::’ (compiling source file …\JuceLibraryCode\include_tracktion_engine_timestretch.cpp)
- Error C3536 ‘numToDropThisTime’: cannot be used before it is initialized (compiling source file …\JuceLibraryCode\include_tracktion_engine_timestretch.cpp) PitchAndTimeDemo_App c:\dev\tracktion_engine\modules\tracktion_engine\timestretch\tracktion_timestretch.cpp 477
- Error C2660 ‘RubberBand::RubberBandStretcher::Impl::ChannelData::setSizes’: function does not take 0 arguments (compiling source file …\JuceLibraryCode\include_tracktion_engine_timestretch.cpp) PitchAndTimeDemo_App c:\dev\cymaticsomatics\prismplayer\lib\rubberband\src\stretcherimpl.cpp 815
- Error (active) E0040 expected an identifier PitchAndTimeDemo_App C:\Dev\tracktion_engine\modules\tracktion_engine\timestretch\tracktion_TimeStretch.cpp 438
- Error C2059 syntax error: ‘)’ (compiling source file …\JuceLibraryCode\include_tracktion_engine_timestretch.cpp) PitchAndTimeDemo_App c:\dev\cymaticsomatics\prismplayer\lib\rubberband\src\stretcherchanneldata.cpp 123
- Error C2144 syntax error: ‘unknown-type’ should be preceded by ‘)’ (compiling source file …\JuceLibraryCode\include_tracktion_engine_timestretch.cpp) PitchAndTimeDemo_App c:\dev\cymaticsomatics\prismplayer\lib\rubberband\src\stretcherimpl.cpp 815
There are actually 64 errors in total, so that is just a sampling. The weird thing is, they basically all seem to have to do with the use of std::min
and std::max
. References to std::min
and std::max
both resolve ok. I’m using Visual Studio 2019, but Platform Toolset v141 (2017, since the pip has a 2017 exporter by default).
Update: The use of std::min and std::max seem fine by itself, but somehow when referencing Rubberband classes and namespace there is some kind of issue with std::min and std::max. Is there a version of Rubberband known to work that perhaps I could try? Maybe some recent changes to Rubberband have created an issue? Building Rubberband 2.0.1 from source worked fine, it’s just the inclusion into TE project.