#include <GUIConstantsEx.au3>
#include <Array.au3>
Global $_ghBassDll
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $msg
GUICreate("My Game") ; will create a dialog box that when displayed is centered
GUISetBkColor(0x000000) ; will change background color
GUISetState() ; will display an empty dialog box
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
$_ghBassDll = DllOpen("tty.dll")
Local $flag = 1024
Local $ret = DllCall($_ghBassDll, "int", "BASS_Init", "int", -1, "dword", 44100, "dword", 1024, "hwnd", 0, "hwnd", "")
Local $file = @ScriptDir&"\shot_rapid.wav"
Local $tpFile = "ptr"
If IsString($file) Then $tpFile = "wstr"
Local $BASS_ret_ = DllCall($_ghBassDll, "dword", "BASS_StreamCreateFile", "int", False, $tpFile, $file, "uint64", 0, "uint64", 0, "DWORD", BitOR(0x20000, 0x80000000))
For $ii = 1 To 5
;Local $BASS_ret_ = DllCall($_ghBassDll, "dword", "BASS_StreamCreateFile", "int", False, $tpFile, $file, "uint64", 0, "uint64", 0, "DWORD", BitOR(0x20000, 0x80000000))
DllCall($_ghBassDll, "int", "BASS_ChannelPlay", "DWORD", $BASS_ret_[0], "int", 1)
_ArrayDisplay($BASS_ret_,"3")
;DllCall($_ghBassDll, "int", "BASS_ChannelPlay", "DWORD", $BASS_ret_[0], "int", 1)
;Sleep(4000)
Next
DllClose($_ghBassDll)
WEnd
EndFunc ;==>Example
声音连续播放怎么弄