mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-09 20:33:03 +01:00
Added BPM functions to Pascal interface of SoundTouch DLL
This commit is contained in:
parent
ec9ba968f5
commit
20e4bf0b04
@ -423,6 +423,13 @@ var
|
|||||||
SoundTouchLibHandle: HINST;
|
SoundTouchLibHandle: HINST;
|
||||||
SoundTouchDLLFile: PAnsiChar = 'SoundTouch.dll';
|
SoundTouchDLLFile: PAnsiChar = 'SoundTouch.dll';
|
||||||
|
|
||||||
|
// bpm detect functions. untested -- if these don't work then remove:
|
||||||
|
bpm_createInstance: function(chan: CInt32; sampleRate : CInt32): THandle; cdecl;
|
||||||
|
bpm_destroyInstance: procedure(h: THandle); cdecl;
|
||||||
|
bpm_getBpm: function(h: THandle): cfloat; cdecl;
|
||||||
|
bpm_putSamples: procedure(h: THandle; const samples: pcfloat;
|
||||||
|
numSamples: cardinal); cdecl;
|
||||||
|
|
||||||
procedure InitDLL;
|
procedure InitDLL;
|
||||||
begin
|
begin
|
||||||
SoundTouchLibHandle := LoadLibrary(SoundTouchDLLFile);
|
SoundTouchLibHandle := LoadLibrary(SoundTouchDLLFile);
|
||||||
@ -454,6 +461,11 @@ begin
|
|||||||
Pointer(SoundTouchNumSamples) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_numSamples');
|
Pointer(SoundTouchNumSamples) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_numSamples');
|
||||||
Pointer(SoundTouchIsEmpty) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_isEmpty');
|
Pointer(SoundTouchIsEmpty) := GetProcAddress(SoundTouchLibHandle, 'soundtouch_isEmpty');
|
||||||
|
|
||||||
|
Pointer(bpm_createInstance) :=GetProcAddress(SoundTouchLibHandle, 'bpm_createInstance');
|
||||||
|
Pointer(bpm_destroyInstance) :=GetProcAddress(SoundTouchLibHandle, 'bpm_destroyInstance');
|
||||||
|
Pointer(bpm_getBpm) :=GetProcAddress(SoundTouchLibHandle, 'bpm_getBpm');
|
||||||
|
Pointer(bpm_putSamples) :=GetProcAddress(SoundTouchLibHandle, 'bpm_putSamples');
|
||||||
|
|
||||||
except
|
except
|
||||||
FreeLibrary(SoundTouchLibHandle);
|
FreeLibrary(SoundTouchLibHandle);
|
||||||
SoundTouchLibHandle := 0;
|
SoundTouchLibHandle := 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user