nobbe Posted February 20, 2008 Posted February 20, 2008 hi all im not really good in writing a dll udf maybe someone can help me in how i could use the BASS.DLL to play sound files ?? thanks! expandcollapse popup;; bass DLL from http://us2.un4seen.com/files/bass23.zip ;; http://www.un4seen.com/ Global Const $BASS_MUSIC_LOOP = 4 ; loop music $BASS = DllOpen(@ScriptDir & "\bass.dll") ;$fName = (@ScriptDir & "\test.mp3") $fName = DllStructCreate(@ScriptDir & "\Test.mp3") ; sample should be :: ;loopende_datei_handle=BASS_StreamCreateFile('test.wav',BASS_SAMPLE_LOOP); ;BASS_Channel_Play(loopende_datei_handle,1); #cs HSTREAM BASS_StreamCreateFile( BOOL mem, void *file, DWORD offset, DWORD length, DWORD flags ); #ce ; HSTREAM stream=BASS_StreamCreateFile(FALSE,"afile.mp3",0,0,0); $handle = DllCall($BASS, "dword", "BASS_StreamCreateFile", _ "int", False, _ ; from file . "ptr", DllStructGetPtr($fName), _ ;file "dword", 0, _ ;offset "dword", 0, _ ;length "dword", 0) ;flag MsgBox(0, "stream create ", $handle) #cs BOOL BASS_ChannelPlay( DWORD handle, BOOL restart ); #ce $ret = DllCall($BASS, "dword", "BASS_ChannelPlay", "dword", $handle, "int", False) MsgBox(0, "BASS_ChannelPlay", $ret)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now