mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-07 07:30:02 +01:00
Small updates to dynamic-link libary build script & pascal example
Signed-off-by: Olli <oparviai'at'iki.fi>
This commit is contained in:
parent
17925302ae
commit
774257ab5f
10
README.html
10
README.html
@ -131,10 +131,12 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<b>Compiling portable Shared Library / DLL version</b>
|
<b>Compiling portable Shared Library / DLL version</b>
|
||||||
<p> The GNU autotools compilation does not automatically create a shared-library version of
|
<p> The GNU autotools compilation automatically builds an additional dynamic-link version
|
||||||
SoundTouch (.so or .dll) that features position-independent code and C-language
|
of SoundTouch library that features position-independent code and "C"-style API that is
|
||||||
api that are more suitable for cross-language development than C++ libraries.</p>
|
more suitable for calling the SoundTouch routines from other programming languages.</p>
|
||||||
<p> Use script "make-gnu-dll-sh" to build a portable dynamic library version if such is desired.</p>
|
<p>This dynamic-link library is built under source/SoundTouchDLL directory, whose
|
||||||
|
subdirectories also comtain simple example apps that use the dynamic-link library.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h4><b>2.2.2 Compiling with cmake</b></h4>
|
<h4><b>2.2.2 Compiling with cmake</b></h4>
|
||||||
<p>'cmake' build scripts are provided as an alternative to the autotools toolchain.</p>
|
<p>'cmake' build scripts are provided as an alternative to the autotools toolchain.</p>
|
||||||
|
|||||||
@ -440,8 +440,11 @@ var
|
|||||||
|
|
||||||
procedure InitDLL;
|
procedure InitDLL;
|
||||||
begin
|
begin
|
||||||
// for Windows: use 'SoundTouch.dll` as filename
|
{$ifdef mswindows} // Windows
|
||||||
|
SoundTouchLibHandle := LoadLibrary('.\SoundTouchDll.dll');
|
||||||
|
{$else} // Unix
|
||||||
SoundTouchLibHandle := LoadLibrary('./libSoundTouchDll.so');
|
SoundTouchLibHandle := LoadLibrary('./libSoundTouchDll.so');
|
||||||
|
{$endif}
|
||||||
if SoundTouchLibHandle <> 0 then
|
if SoundTouchLibHandle <> 0 then
|
||||||
try
|
try
|
||||||
Pointer(SoundTouchCreateInstance) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_createInstance');
|
Pointer(SoundTouchCreateInstance) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_createInstance');
|
||||||
|
|||||||
@ -17,9 +17,6 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/am_include.mk
|
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 \
|
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/RateTransposer.h ../SoundTouch/TDStretch.h ../SoundTouch/PeakFinder.h ../SoundTouch/InterpolateCubic.h \
|
||||||
../SoundTouch/InterpolateLinear.h ../SoundTouch/InterpolateShannon.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/BPMDetect.cpp ../SoundTouch/PeakFinder.cpp ../SoundTouch/InterpolateLinear.cpp \
|
||||||
../SoundTouch/InterpolateCubic.cpp ../SoundTouch/InterpolateShannon.cpp SoundTouchDLL.cpp
|
../SoundTouch/InterpolateCubic.cpp ../SoundTouch/InterpolateShannon.cpp SoundTouchDLL.cpp
|
||||||
|
|
||||||
# Compiler flags
|
|
||||||
|
|
||||||
# Modify the default 0.0.0 to LIB_SONAME.0.0
|
# Modify the default 0.0.0 to LIB_SONAME.0.0
|
||||||
#libSoundTouchDll_la_LDFLAGS=-version-info @LIB_SONAME@
|
|
||||||
LDFLAGS=-version-info @LIB_SONAME@
|
LDFLAGS=-version-info @LIB_SONAME@
|
||||||
|
|
||||||
|
|
||||||
if X86
|
if X86
|
||||||
CXXFLAGS1=-mstackrealign -msse
|
CXXFLAGS1=-mstackrealign -msse
|
||||||
endif
|
endif
|
||||||
@ -49,9 +42,4 @@ if X86_64
|
|||||||
CXXFLAGS2=-fPIC
|
CXXFLAGS2=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#libSoundTouchDll_CXXFLAGS=$(AM_CXXFLAGS) $(CXXFLAGS1) $(CXXFLAGS2) -shared -DDLL_EXPORTS -fvisibility=hidden
|
|
||||||
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?
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
|
# 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
|
# This script compiles SoundTouch dynamic-link library for GNU environment
|
||||||
# with wrapper functions that are easier to import to Java / Mono / etc
|
# with wrapper functions that are easier to import to Java / Mono / etc
|
||||||
#
|
#
|
||||||
@ -16,6 +19,10 @@ if [[ $arch == *"86"* ]]; then
|
|||||||
fi
|
fi
|
||||||
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"
|
echo "Building SoundTouchDLL for $arch with flags:$flags"
|
||||||
|
|
||||||
g++ -O3 -ffast-math -shared $flags -DDLL_EXPORTS -fvisibility=hidden -I../../include \
|
g++ -O3 -ffast-math -shared $flags -DDLL_EXPORTS -fvisibility=hidden -I../../include \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user