Wrong parameter type in DLL
Brought to you by:
oparviai
Hello.
In the SoundTouchDLL.cpp the methods "soundtouch_putSamples" and "soundtouch_receiveSamples" are implemented with parameter type "SAMPLETYPE", which is in fact "short" or "float".
BUT in the header file "SoundTouchDLL.h" these parameters are declared as "float".
If the SAMPLETYPE of the lib is set to "short", this causes the following errors:
Error 2 error C2733: 'soundtouch_putSamples' : second C linkage of overloaded function not allowed
Error 3 error C2733: 'soundtouch_receiveSamples' : second C linkage of overloaded function not allowed
I think there are 2 options to fix it:
Greets from Germany
Thanks for the comments. To avoid mess with incompatible DLL variations, I addressed this by adding new convenience functions to the SoundTouch.dll API that allow using int16/short sample format. These function perform int16<->float data conversion inside the dll:
soundtouch_putSamples_i16()
soundtouch_receiveSamples_i16()