diff --git a/source/SoundTouchDLL/SoundTouchDLL.cpp b/source/SoundTouchDLL/SoundTouchDLL.cpp index 5888bcd..aa3c012 100644 --- a/source/SoundTouchDLL/SoundTouchDLL.cpp +++ b/source/SoundTouchDLL/SoundTouchDLL.cpp @@ -107,6 +107,15 @@ SOUNDTOUCHDLL_API const char *__stdcall soundtouch_getVersionString() return SoundTouch::getVersionString(); } + +/// Get SoundTouch library version string - alternative function for +/// environments that can't properly handle character string as return value +SOUNDTOUCHDLL_API void __stdcall soundtouch_getVersionString2(char* versionString, int bufferSize) +{ + strcpy_s(versionString, bufferSize, SoundTouch::getVersionString()); +} + + /// Get SoundTouch library version Id SOUNDTOUCHDLL_API uint __stdcall soundtouch_getVersionId() { diff --git a/source/SoundTouchDLL/SoundTouchDLL.h b/source/SoundTouchDLL/SoundTouchDLL.h index 4b15aad..1d8f17a 100644 --- a/source/SoundTouchDLL/SoundTouchDLL.h +++ b/source/SoundTouchDLL/SoundTouchDLL.h @@ -58,6 +58,10 @@ SOUNDTOUCHDLL_API void __stdcall soundtouch_destroyInstance(HANDLE h); /// Get SoundTouch library version string SOUNDTOUCHDLL_API const char *__stdcall soundtouch_getVersionString(); +/// Get SoundTouch library version string - alternative function for +/// environments that can't properly handle character string as return value +SOUNDTOUCHDLL_API void __stdcall soundtouch_getVersionString2(char* versionString, int bufferSize); + /// Get SoundTouch library version Id SOUNDTOUCHDLL_API unsigned int __stdcall soundtouch_getVersionId();