mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-08 12:02:28 +01:00
Merge pull request 'Migrate configuration file, add building of dynamic-link version to the master makefile' (#9) from config-updates into master
Reviewed-on: https://codeberg.org/soundtouch/soundtouch/pulls/9
This commit is contained in:
commit
eaa9090f65
45
configure.ac
45
configure.ac
@ -15,19 +15,19 @@ dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|||||||
dnl Place - Suite 330, Boston, MA 02111-1307, USA
|
dnl Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT([SoundTouch], [2.3.1], [http://www.surina.net/soundtouch])
|
AC_INIT([SoundTouch],[2.3.1],[http://www.surina.net/soundtouch])
|
||||||
dnl Default to libSoundTouch.so.$LIB_SONAME.0.0
|
dnl Default to libSoundTouch.so.$LIB_SONAME.0.0
|
||||||
LIB_SONAME=1
|
LIB_SONAME=1
|
||||||
AC_SUBST(LIB_SONAME)
|
AC_SUBST(LIB_SONAME)
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AC_CONFIG_MACRO_DIR([config/m4])
|
AC_CONFIG_MACRO_DIR([config/m4])
|
||||||
AM_CONFIG_HEADER([config.h include/soundtouch_config.h])
|
AC_CONFIG_HEADERS([config.h include/soundtouch_config.h])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
#AC_DISABLE_SHARED dnl This makes libtool only build static libs
|
#AC_DISABLE_SHARED dnl This makes libtool only build static libs
|
||||||
AC_DISABLE_STATIC dnl This makes libtool only build shared libs
|
AC_DISABLE_STATIC dnl This makes libtool only build shared libs
|
||||||
#AC_GNU_SOURCE dnl enable posix extensions in glibc
|
#AC_USE_SYSTEM_EXTENSIONS dnl enable posix extensions in glibc
|
||||||
|
|
||||||
AC_LANG(C++)
|
AC_LANG(C++)
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ AC_PROG_INSTALL
|
|||||||
#AC_PROG_LN_S
|
#AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
AM_PROG_LIBTOOL dnl turn on using libtool
|
LT_INIT dnl turn on using libtool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ AM_PROG_LIBTOOL dnl turn on using libtool
|
|||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
dnl # Checks for header files #
|
dnl # Checks for header files #
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
AC_HEADER_STDC
|
|
||||||
#AC_HEADER_SYS_WAIT
|
#AC_HEADER_SYS_WAIT
|
||||||
# add any others you want to check for here
|
# add any others you want to check for here
|
||||||
AC_CHECK_HEADERS([cpuid.h])
|
AC_CHECK_HEADERS([cpuid.h])
|
||||||
@ -82,14 +82,12 @@ AC_C_INLINE
|
|||||||
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(integer-samples,
|
AC_ARG_ENABLE(integer-samples,
|
||||||
[AC_HELP_STRING([--enable-integer-samples],
|
[AS_HELP_STRING([--enable-integer-samples],[use integer samples instead of floats [default=no]])],,
|
||||||
[use integer samples instead of floats [default=no]])],,
|
|
||||||
[enable_integer_samples=no])
|
[enable_integer_samples=no])
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(openmp,
|
AC_ARG_ENABLE(openmp,
|
||||||
[AC_HELP_STRING([--enable-openmp],
|
[AS_HELP_STRING([--enable-openmp],[use parallel multicore calculation through OpenMP [default=no]])],,
|
||||||
[use parallel multicore calculation through OpenMP [default=no]])],,
|
|
||||||
[enable_openmp=no])
|
[enable_openmp=no])
|
||||||
|
|
||||||
# Let the user enable/disable the x86 optimizations.
|
# Let the user enable/disable the x86 optimizations.
|
||||||
@ -232,6 +230,26 @@ if test "x$enable_neon_optimizations" = "xyes" -a "x$ac_cv_header_arm_neon_h" =
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
HOST_OS=""
|
||||||
|
AS_CASE([$host_cpu],
|
||||||
|
[x86_64],
|
||||||
|
[
|
||||||
|
x86_64=true
|
||||||
|
x86=true
|
||||||
|
],
|
||||||
|
[i?86],
|
||||||
|
[
|
||||||
|
x86=true
|
||||||
|
])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([X86], [test "$x86" = true])
|
||||||
|
AM_CONDITIONAL([X86_64], [test "$x86_64" = true])
|
||||||
|
|
||||||
|
AC_SUBST([HOST_OS])
|
||||||
|
|
||||||
|
|
||||||
# Set AM_CXXFLAGS
|
# Set AM_CXXFLAGS
|
||||||
AC_SUBST([AM_CXXFLAGS], [$AM_CXXFLAGS])
|
AC_SUBST([AM_CXXFLAGS], [$AM_CXXFLAGS])
|
||||||
|
|
||||||
@ -254,8 +272,6 @@ AM_CONDITIONAL([HAVE_SSE], [test "x$have_sse_intrinsics" = "xyes"])
|
|||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
dnl # Checks for library functions/classes #
|
dnl # Checks for library functions/classes #
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
AC_FUNC_MALLOC
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
|
|
||||||
dnl make -lm get added to the LIBS
|
dnl make -lm get added to the LIBS
|
||||||
AC_CHECK_LIB(m, sqrt,,AC_MSG_ERROR([compatible libc math library not found]))
|
AC_CHECK_LIB(m, sqrt,,AC_MSG_ERROR([compatible libc math library not found]))
|
||||||
@ -288,11 +304,12 @@ AC_CONFIG_FILES([
|
|||||||
source/Makefile
|
source/Makefile
|
||||||
source/SoundTouch/Makefile
|
source/SoundTouch/Makefile
|
||||||
source/SoundStretch/Makefile
|
source/SoundStretch/Makefile
|
||||||
|
source/SoundTouchDLL/Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_OUTPUT(
|
AC_CONFIG_FILES([soundtouch.pc
|
||||||
soundtouch.pc
|
])
|
||||||
)
|
AC_OUTPUT
|
||||||
|
|
||||||
dnl use 'echo' to put stuff here if you want a message to the builder
|
dnl use 'echo' to put stuff here if you want a message to the builder
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/am_include.mk
|
include $(top_srcdir)/config/am_include.mk
|
||||||
|
|
||||||
SUBDIRS=SoundTouch SoundStretch
|
SUBDIRS=SoundTouch SoundStretch SoundTouchDLL
|
||||||
|
|
||||||
# set to something if you want other stuff to be included in the distribution tarball
|
# set to something if you want other stuff to be included in the distribution tarball
|
||||||
#EXTRA_DIST=
|
#EXTRA_DIST=
|
||||||
|
10
source/SoundTouchDLL/LazarusTest/README.txt
Normal file
10
source/SoundTouchDLL/LazarusTest/README.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
This is Lazarus Pascal example that loads the SoundTouch dynamic-load library
|
||||||
|
and queries the library version as a simple example how to load SoundTouch from
|
||||||
|
Pascal / Lazarus.
|
||||||
|
|
||||||
|
Set the SoundTouch dynamic library file name in the 'InitDLL' procedure of
|
||||||
|
file 'SoundTouchDLL.pas' depending on if you're building for Windows or Linux.
|
||||||
|
|
||||||
|
The example expects the the 'libSoundTouchDll.so' (linux) or 'SoundTouch.dll' (Windows)
|
||||||
|
library binary files is found within this project directory, either via soft-link
|
||||||
|
(in Linux) or as a copied file.
|
@ -2,11 +2,8 @@ unit SoundTouchDLL;
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// SoundTouch.dll wrapper for accessing SoundTouch routines from Delphi/Pascal
|
// SoundTouch.dll / libSoundTouchDll.so wrapper for accessing SoundTouch
|
||||||
//
|
// routines from Delphi/Pascal/Lazarus
|
||||||
// Module Author : Christian Budde
|
|
||||||
//
|
|
||||||
// 2014-01-12 fixes by Sandro Cumerlato <sandro.cumerlato 'at' gmail.com>
|
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -33,8 +30,8 @@ unit SoundTouchDLL;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
//uses
|
||||||
Windows;
|
//Windows;
|
||||||
|
|
||||||
type
|
type
|
||||||
TSoundTouchHandle = THandle;
|
TSoundTouchHandle = THandle;
|
||||||
@ -107,6 +104,13 @@ type
|
|||||||
//< contains data for both channels.
|
//< contains data for both channels.
|
||||||
); cdecl;
|
); cdecl;
|
||||||
|
|
||||||
|
TSoundTouchPutSamplesI16 = procedure (Handle: TSoundTouchHandle;
|
||||||
|
const Samples: Pint16; //< Pointer to sample buffer.
|
||||||
|
NumSamples: Cardinal //< Number of samples in buffer. Notice
|
||||||
|
//< that in case of stereo-sound a single sample
|
||||||
|
//< contains data for both channels.
|
||||||
|
); cdecl;
|
||||||
|
|
||||||
// Clears all the samples in the object's output and internal processing
|
// Clears all the samples in the object's output and internal processing
|
||||||
// buffers.
|
// buffers.
|
||||||
TSoundTouchClear = procedure (Handle: TSoundTouchHandle); cdecl;
|
TSoundTouchClear = procedure (Handle: TSoundTouchHandle); cdecl;
|
||||||
@ -131,16 +135,20 @@ type
|
|||||||
// Returns number of samples currently unprocessed.
|
// Returns number of samples currently unprocessed.
|
||||||
TSoundTouchNumUnprocessedSamples = function (Handle: TSoundTouchHandle): Cardinal; cdecl;
|
TSoundTouchNumUnprocessedSamples = function (Handle: TSoundTouchHandle): Cardinal; cdecl;
|
||||||
|
|
||||||
// Adjusts book-keeping so that given number of samples are removed from beginning of the
|
/// Receive ready samples from the processing pipeline.
|
||||||
// sample buffer without copying them anywhere.
|
///
|
||||||
//
|
/// if called with outBuffer=NULL, just reduces amount of ready samples within the pipeline.
|
||||||
// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
|
|
||||||
// with 'ptrBegin' function.
|
|
||||||
TSoundTouchReceiveSamples = function (Handle: TSoundTouchHandle;
|
TSoundTouchReceiveSamples = function (Handle: TSoundTouchHandle;
|
||||||
OutBuffer: PSingle; //< Buffer where to copy output samples.
|
OutBuffer: PSingle; //< Buffer where to copy output samples.
|
||||||
MaxSamples: Integer //< How many samples to receive at max.
|
MaxSamples: Integer //< How many samples to receive at max.
|
||||||
): Cardinal; cdecl;
|
): Cardinal; cdecl;
|
||||||
|
|
||||||
|
/// int16 version of soundtouch_receiveSamples(): This converts internal float samples
|
||||||
|
/// into int16 (short) return data type
|
||||||
|
TSoundTouchReceiveSamplesI16 = function (Handle: TSoundTouchHandle;
|
||||||
|
OutBuffer: int16; //< Buffer where to copy output samples.
|
||||||
|
MaxSamples: Integer //< How many samples to receive at max.
|
||||||
|
): Cardinal; cdecl;
|
||||||
// Returns number of samples currently available.
|
// Returns number of samples currently available.
|
||||||
TSoundTouchNumSamples = function (Handle: TSoundTouchHandle): Cardinal; cdecl;
|
TSoundTouchNumSamples = function (Handle: TSoundTouchHandle): Cardinal; cdecl;
|
||||||
|
|
||||||
@ -170,6 +178,7 @@ var
|
|||||||
SoundTouchGetSetting : TSoundTouchGetSetting;
|
SoundTouchGetSetting : TSoundTouchGetSetting;
|
||||||
SoundTouchNumUnprocessedSamples : TSoundTouchNumUnprocessedSamples;
|
SoundTouchNumUnprocessedSamples : TSoundTouchNumUnprocessedSamples;
|
||||||
SoundTouchReceiveSamples : TSoundTouchReceiveSamples;
|
SoundTouchReceiveSamples : TSoundTouchReceiveSamples;
|
||||||
|
SoundTouchReceiveSamplesI16 : TSoundTouchReceiveSamplesI16;
|
||||||
SoundTouchNumSamples : TSoundTouchNumSamples;
|
SoundTouchNumSamples : TSoundTouchNumSamples;
|
||||||
SoundTouchIsEmpty : TSoundTouchIsEmpty;
|
SoundTouchIsEmpty : TSoundTouchIsEmpty;
|
||||||
|
|
||||||
@ -232,6 +241,9 @@ type
|
|||||||
property IsEmpty: Integer read GetIsEmpty;
|
property IsEmpty: Integer read GetIsEmpty;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// list of exported functions and procedures
|
||||||
|
function IsSoundTouchLoaded: Boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ TSoundTouch }
|
{ TSoundTouch }
|
||||||
@ -416,19 +428,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
SoundTouchLibHandle: HINST;
|
SoundTouchLibHandle: THandle;
|
||||||
SoundTouchDLLFile: PAnsiChar = 'SoundTouch.dll';
|
SoundTouchDLLFile: AnsiString = 'libSoundTouchDll.so';
|
||||||
|
//SoundTouchDLLFile: AnsiString = 'SoundTouch.dll';
|
||||||
|
|
||||||
// bpm detect functions. untested -- if these don't work then remove:
|
// bpm detect functions. untested -- if these don't work then remove:
|
||||||
bpm_createInstance: function(chan: CInt32; sampleRate : CInt32): THandle; cdecl;
|
bpm_createInstance: function(chan: int32; sampleRate : int32): THandle; cdecl;
|
||||||
bpm_destroyInstance: procedure(h: THandle); cdecl;
|
bpm_destroyInstance: procedure(h: THandle); cdecl;
|
||||||
bpm_getBpm: function(h: THandle): cfloat; cdecl;
|
bpm_getBpm: function(h: THandle): Single; cdecl;
|
||||||
bpm_putSamples: procedure(h: THandle; const samples: pcfloat;
|
bpm_putSamples: procedure(h: THandle; const samples: PSingle; numSamples: cardinal); cdecl;
|
||||||
numSamples: cardinal); cdecl;
|
|
||||||
|
|
||||||
procedure InitDLL;
|
procedure InitDLL;
|
||||||
begin
|
begin
|
||||||
SoundTouchLibHandle := LoadLibrary(SoundTouchDLLFile);
|
// for Windows: use 'SoundTouch.dll` as filename
|
||||||
|
SoundTouchLibHandle := LoadLibrary('./libSoundTouchDll.so');
|
||||||
if SoundTouchLibHandle <> 0 then
|
if SoundTouchLibHandle <> 0 then
|
||||||
try
|
try
|
||||||
Pointer(SoundTouchCreateInstance) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_createInstance');
|
Pointer(SoundTouchCreateInstance) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_createInstance');
|
||||||
@ -473,6 +486,12 @@ begin
|
|||||||
if SoundTouchLibHandle <> 0 then FreeLibrary(SoundTouchLibHandle);
|
if SoundTouchLibHandle <> 0 then FreeLibrary(SoundTouchLibHandle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// returns 'true' if SoundTouch dynamic library has been successfully loaded, otherwise 'false'
|
||||||
|
function IsSoundTouchLoaded: Boolean;
|
||||||
|
begin;
|
||||||
|
result := SoundTouchLibHandle <> 0
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
InitDLL;
|
InitDLL;
|
||||||
|
|
1
source/SoundTouchDLL/LazarusTest/libSoundTouchDll.so
Symbolic link
1
source/SoundTouchDLL/LazarusTest/libSoundTouchDll.so
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../.libs/libSoundTouchDll.so
|
36
source/SoundTouchDLL/LazarusTest/main.lfm
Normal file
36
source/SoundTouchDLL/LazarusTest/main.lfm
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 2237
|
||||||
|
Height = 128
|
||||||
|
Top = 242
|
||||||
|
Width = 381
|
||||||
|
Caption = 'SoundTouch test'
|
||||||
|
ClientHeight = 128
|
||||||
|
ClientWidth = 381
|
||||||
|
LCLVersion = '2.2.0.4'
|
||||||
|
object Load: TButton
|
||||||
|
Left = 19
|
||||||
|
Height = 50
|
||||||
|
Top = 16
|
||||||
|
Width = 144
|
||||||
|
Caption = 'Load SoundTouch'
|
||||||
|
OnClick = LoadClick
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EditVersion: TEdit
|
||||||
|
Left = 184
|
||||||
|
Height = 34
|
||||||
|
Top = 80
|
||||||
|
Width = 184
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'n/a'
|
||||||
|
TextHint = 'click to populate'
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 19
|
||||||
|
Height = 17
|
||||||
|
Top = 90
|
||||||
|
Width = 156
|
||||||
|
Caption = 'Soundtouch lib version:'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
end
|
49
source/SoundTouchDLL/LazarusTest/main.pas
Normal file
49
source/SoundTouchDLL/LazarusTest/main.pas
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
unit main;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, SoundTouchDLL;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
EditVersion: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
Load: TButton;
|
||||||
|
|
||||||
|
procedure LoadClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.LoadClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
version:string;
|
||||||
|
begin
|
||||||
|
if IsSoundTouchLoaded() then
|
||||||
|
version := SoundTouchGetVersionString()
|
||||||
|
else
|
||||||
|
version := '<library loading failed>';
|
||||||
|
|
||||||
|
EditVersion.Text:= version;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
BIN
source/SoundTouchDLL/LazarusTest/soundtouchtest.ico
Normal file
BIN
source/SoundTouchDLL/LazarusTest/soundtouchtest.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
78
source/SoundTouchDLL/LazarusTest/soundtouchtest.lpi
Normal file
78
source/SoundTouchDLL/LazarusTest/soundtouchtest.lpi
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<Title Value="soundtouchtest"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<BuildModes>
|
||||||
|
<Item Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<UseFileFilters Value="True"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="soundtouchtest.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="soundtouchtest"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf3"/>
|
||||||
|
</Debugging>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
25
source/SoundTouchDLL/LazarusTest/soundtouchtest.lpr
Normal file
25
source/SoundTouchDLL/LazarusTest/soundtouchtest.lpr
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
program soundtouchtest;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF HASAMIGA}
|
||||||
|
athreads,
|
||||||
|
{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, main
|
||||||
|
{ you can add units after this };
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
RequireDerivedFormResource:=True;
|
||||||
|
Application.Scaled:=True;
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
186
source/SoundTouchDLL/LazarusTest/soundtouchtest.lps
Normal file
186
source/SoundTouchDLL/LazarusTest/soundtouchtest.lps
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="soundtouchtest.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<CursorPos X="26" Y="43"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="../SoundTouchDLL.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="37"/>
|
||||||
|
<CursorPos X="19"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="/usr/lib/lazarus/2.2.0/lcl/interfaces/gtk2/gtk2proc.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="7149"/>
|
||||||
|
<CursorPos X="3" Y="7184"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="/usr/lib/lazarus/2.2.0/components/freetype/easylazfreetype.pas"/>
|
||||||
|
<UnitName Value="EasyLazFreeType"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="539"/>
|
||||||
|
<CursorPos X="16" Y="574"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="326"/>
|
||||||
|
<CursorPos X="127" Y="379"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory HistoryIndex="29">
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="439" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="427" Column="37" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="439" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="427" Column="32" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="444" Column="48" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="439" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="416" Column="116" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="439" TopLine="403"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="45" Column="40"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="243" Column="38" TopLine="197"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="487" Column="38" TopLine="429"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="42" Column="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="41" Column="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="44" Column="6"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="43" Column="39"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="44" Column="7"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="38" Column="7"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="467" TopLine="423"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="212" Column="32" TopLine="78"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="361" Column="37" TopLine="308"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="466" Column="37" TopLine="413"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="467" Column="37" TopLine="413"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="466" Column="13" TopLine="413"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="361" Column="13" TopLine="326"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="110" Column="3" TopLine="74"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="180" Column="37" TopLine="145"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="179" Column="55" TopLine="145"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="146" Column="3" TopLine="145"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="149" TopLine="111"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="SoundTouchDLL.pas"/>
|
||||||
|
<Caret Line="151" Column="31" TopLine="116"/>
|
||||||
|
</Position>
|
||||||
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes ActiveMode=""/>
|
||||||
|
</RunParams>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
57
source/SoundTouchDLL/Makefile.am
Normal file
57
source/SoundTouchDLL/Makefile.am
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
## Process this file with automake to create Makefile.in
|
||||||
|
##
|
||||||
|
## This file is part of SoundTouch, an audio processing library for pitch/time adjustments
|
||||||
|
##
|
||||||
|
## SoundTouch is free software; you can redistribute it and/or modify it under the
|
||||||
|
## terms of the GNU General Public License as published by the Free Software
|
||||||
|
## Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
## version.
|
||||||
|
##
|
||||||
|
## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
## A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License along with
|
||||||
|
## this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||||
|
## Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
include_HEADERS=SoundTouchDLL.h
|
||||||
|
|
||||||
|
lib_LTLIBRARIES=libSoundTouchDll.la
|
||||||
|
#
|
||||||
|
libSoundTouchDll_la_SOURCES=../SoundTouch/AAFilter.cpp ../SoundTouch/FIRFilter.cpp \
|
||||||
|
../SoundTouch/FIFOSampleBuffer.cpp ../SoundTouch/RateTransposer.cpp ../SoundTouch/SoundTouch.cpp \
|
||||||
|
../SoundTouch/TDStretch.cpp ../SoundTouch/sse_optimized.cpp ../SoundTouch/cpu_detect_x86.cpp \
|
||||||
|
../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
|
||||||
|
|
||||||
|
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?
|
@ -373,11 +373,9 @@ SOUNDTOUCHDLL_API uint __cdecl soundtouch_numUnprocessedSamples(HANDLE h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Adjusts book-keeping so that given number of samples are removed from beginning of the
|
/// Receive ready samples from the processing pipeline.
|
||||||
/// sample buffer without copying them anywhere.
|
|
||||||
///
|
///
|
||||||
/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
|
/// if called with outBuffer=NULL, just reduces amount of ready samples within the pipeline.
|
||||||
/// with 'ptrBegin' function.
|
|
||||||
SOUNDTOUCHDLL_API uint __cdecl soundtouch_receiveSamples(HANDLE h,
|
SOUNDTOUCHDLL_API uint __cdecl soundtouch_receiveSamples(HANDLE h,
|
||||||
SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
|
SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
|
||||||
unsigned int maxSamples ///< How many samples to receive at max.
|
unsigned int maxSamples ///< How many samples to receive at max.
|
||||||
|
Loading…
Reference in New Issue
Block a user