diff --git a/README.html b/README.html index f1ee1ed..8b81f48 100644 --- a/README.html +++ b/README.html @@ -131,10 +131,12 @@ Compiling portable Shared Library / DLL version -

The GNU autotools compilation does not automatically create a shared-library version of - SoundTouch (.so or .dll) that features position-independent code and C-language - api that are more suitable for cross-language development than C++ libraries.

-

Use script "make-gnu-dll-sh" to build a portable dynamic library version if such is desired.

+

The GNU autotools compilation automatically builds an additional dynamic-link version + of SoundTouch library that features position-independent code and "C"-style API that is + more suitable for calling the SoundTouch routines from other programming languages.

+

This dynamic-link library is built under source/SoundTouchDLL directory, whose + subdirectories also comtain simple example apps that use the dynamic-link library. +

2.2.2 Compiling with cmake

'cmake' build scripts are provided as an alternative to the autotools toolchain.

@@ -622,7 +624,7 @@ window. This ensures that with zero tempo change the output will be same as input.
  • Bugfix: Fix a bug in TDstrectch with too small initial skipFract value that occurred - with certain processing parameter settings: Replace assert with assignment that + with certain processing parameter settings: Replace assert with assignment that corrects the situation.
  • Remove OpenMP "_init_threading" workaround from Android build as it's not needed with concurrent diff --git a/source/SoundTouchDLL/LazarusTest/SoundTouchDLL.pas b/source/SoundTouchDLL/LazarusTest/SoundTouchDLL.pas index 3c6c362..5e117aa 100644 --- a/source/SoundTouchDLL/LazarusTest/SoundTouchDLL.pas +++ b/source/SoundTouchDLL/LazarusTest/SoundTouchDLL.pas @@ -440,8 +440,11 @@ var procedure InitDLL; begin - // for Windows: use 'SoundTouch.dll` as filename +{$ifdef mswindows} // Windows + SoundTouchLibHandle := LoadLibrary('.\SoundTouchDll.dll'); +{$else} // Unix SoundTouchLibHandle := LoadLibrary('./libSoundTouchDll.so'); +{$endif} if SoundTouchLibHandle <> 0 then try Pointer(SoundTouchCreateInstance) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_createInstance'); diff --git a/source/SoundTouchDLL/Makefile.am b/source/SoundTouchDLL/Makefile.am index 65b764e..ecd1fd2 100644 --- a/source/SoundTouchDLL/Makefile.am +++ b/source/SoundTouchDLL/Makefile.am @@ -17,9 +17,6 @@ include $(top_srcdir)/config/am_include.mk -#AUTOMAKE_OPTIONS = subdir-objects - - noinst_HEADERS=../SoundTouch/AAFilter.h ../SoundTouch/cpu_detect.h ../SoundTouch/cpu_detect_x86.cpp ../SoundTouch/FIRFilter.h \ ../SoundTouch/RateTransposer.h ../SoundTouch/TDStretch.h ../SoundTouch/PeakFinder.h ../SoundTouch/InterpolateCubic.h \ ../SoundTouch/InterpolateLinear.h ../SoundTouch/InterpolateShannon.h @@ -34,13 +31,9 @@ libSoundTouchDll_la_SOURCES=../SoundTouch/AAFilter.cpp ../SoundTouch/FIRFilter.c ../SoundTouch/BPMDetect.cpp ../SoundTouch/PeakFinder.cpp ../SoundTouch/InterpolateLinear.cpp \ ../SoundTouch/InterpolateCubic.cpp ../SoundTouch/InterpolateShannon.cpp SoundTouchDLL.cpp -# Compiler flags - # Modify the default 0.0.0 to LIB_SONAME.0.0 -#libSoundTouchDll_la_LDFLAGS=-version-info @LIB_SONAME@ LDFLAGS=-version-info @LIB_SONAME@ - if X86 CXXFLAGS1=-mstackrealign -msse endif @@ -49,9 +42,4 @@ if X86_64 CXXFLAGS2=-fPIC endif -#libSoundTouchDll_CXXFLAGS=$(AM_CXXFLAGS) $(CXXFLAGS1) $(CXXFLAGS2) -shared -DDLL_EXPORTS -fvisibility=hidden CXXFLAGS=$(AM_CXXFLAGS) $(CXXFLAGS1) $(CXXFLAGS2) -shared -DDLL_EXPORTS -fvisibility=hidden - -# TODO: -# - saatu kääntymään -# - tee testi, toimiiko dll? diff --git a/source/SoundTouchDLL/make-gnu-dll.sh b/source/SoundTouchDLL/make-gnu-dll.sh index 95af7e4..4d48ee4 100755 --- a/source/SoundTouchDLL/make-gnu-dll.sh +++ b/source/SoundTouchDLL/make-gnu-dll.sh @@ -1,6 +1,9 @@ #!/bin/bash # -# This script compiles SoundTouch dynamic-link library for GNU environment +# This script is deprecated. Don't use this, the makefile can now compile +# the dynamic-link library 'libSoundTouchDLL.so' automatically. +# +# This script compiles SoundTouch dynamic-link library for GNU environment # with wrapper functions that are easier to import to Java / Mono / etc # @@ -11,11 +14,15 @@ if [[ $arch == *"86"* ]]; then # Intel x86/x64 architecture flags="$flags -mstackrealign -msse" - if [[ $arch == *"_64" ]]; then + if [[ $arch == *"_64" ]]; then flags="$flags -fPIC" fi fi +echo "*************************************************************************" +echo "NOTE: Rather use the makefile that can now build the dynamic-link library" +echo "*************************************************************************" +echo "" echo "Building SoundTouchDLL for $arch with flags:$flags" g++ -O3 -ffast-math -shared $flags -DDLL_EXPORTS -fvisibility=hidden -I../../include \