Hallo,
kann mir jemand bitte auf die Sprünge helfen bei der Frage, wie man die libsndfile DLL einbauen kann? Unten ein erster Versuch ... Ich will letztendlich mit sf_command bestimmte Datei-Eigenschaften abfragen. DLL hängt an.
API:
http://www.mega-nerd.com/libsndfile/api.html
Dank und Gruß
Thomas
AutoIt
#include <String.au3>
#include <InetConstants.au3>
#include <MsgBoxConstants.au3>
Global $g_Libsndfile = DllOpen(@ScriptDir & "\libsndfile-1.dll")
Global $file = @ScriptDir & "\test.wav"
$sf_info = DllStructCreate("int64 frames;int samplerate;int channels ;int format ;int sections ;int seekable;")
$stString = DLLStructCreate("char[260]")
DllStructSetData($stString, 1, $file)
ConsoleWrite(_SF_Open($stString,DllStructGetPtr($sf_info)) & @CRLF)
MsgBox(0,"",DllStructGetPtr($sf_info))
_Close_()
Func _SF_Open($stString,$sfinfo)
Return DllCall($g_Libsndfile, "int*:cdecl" ,"sf_wchar_open", "ptr", DllStructGetPtr($stString), "int", "SFM_READ","ptr*", DllStructGetPtr($sf_info))
EndFunc
Func _Close_()
DllClose($g_Libsndfile)
EndFunc
Alles anzeigen