hi ich habe 3 probleme mit meinem player
1)warum funzt das nicht wenn ich den slider bewege mit der musik lautstärke ;erledigt
2)wie kann ich in einem slider anzeigen lassen wo sich der aktuelle titel grade befindet;erledigt ging mit guictrlprogress
3)wie kann ich dann an eine bestimmte stelle des liedes springen
4)mit welchem befehl kann ich den bass regeln?
5)wie kann ich mehrere lieder hintereinader abspielen lassen?
#include <GUIConstants.au3>
#include <Sound.au3>
#include <SliderConstants.au3>
opt("guioneventmode",1)
$Form1 = GUICreate("Black Player", 226, 161, 441, 477)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Länge", 112, 40, 84, 17)
$menu=GUICtrlCreateMenu("File")
$menusong=GUICtrlCreateMenuItem("Choose Song",$menu)
guictrlsetonevent(-1,"choosesong")
GUICtrlCreateMenuItem("Exit",$menu)
guictrlsetonevent(-1,"_exit")
$Button1 = GUICtrlCreateButton("Stop", 8, 104, 81, 33, 0)
GUICtrlSetOnEvent(-1,"stop")
$Button2 = GUICtrlCreateButton("Play", 8, 64, 81, 33, 0)
guictrlsetonevent(-1,"Play")
$Button3 = GUICtrlCreateButton("Pause", 112, 64, 81, 33, 0)
guictrlsetonevent(-1,"Pause")
$Button4 = GUICtrlCreateButton("Resume", 112, 104, 81, 33, 0)
guictrlsetonevent(-1,"Resume")
$Slider2 = GUICtrlCreateSlider(200, 8, 17, 129,BitOR($TBS_VERT, $TBS_AUTOTICKS, $TBS_LEFT))
GUICtrlSetOnEvent(-1,"_volume")
guisetonevent($GUI_EVENT_CLOSE,"_exit")
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button3, $GUI_DISABLE)
GUICtrlSetState($Button4, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_DISABLE)
$Slider1 = GUICtrlCreateSlider(8, 8, 190, 29)
guictrlsetonevent(-1,"slider")
$sound = ""
$a = 0
GUISetState(@SW_SHOW)
func _volume()
SoundSetWaveVolume($slider2)
endfunc
While 1
sleep(20)
guictrlsetdata($slider1,_soundpos($sound,0))
if $a = 1 Then
if _soundpos($sound,1) = _SoundLength($sound,1) Then
stop()
$a = 0
endif
endif
wend
func slider()
EndFunc
func choosesong()
global $choosefile=fileopendialog("Choose a sound","C:\Users\" & @username & "\Music","Musik(*.mp3)",1+4)
GUICtrlSetState($Button2, $GUI_enable)
endfunc
func play()
$a = 1
global $sound=_soundopen($choosefile)
global $play=_SoundPlay($sound)
GUICtrlSetState($Button3, $GUI_Enable)
GUICtrlSetState($Button1, $GUI_Enable)
GUICtrlSetState($Button2, $GUI_DISABLE)
GUICtrlSetState($menusong, $GUI_DISABLE)
GUICtrlSetLimit($slider1, _SoundLength($sound,0), 0)
if _soundpos($sound,1) = _SoundLength($sound,1) Then
stop()
endif
endfunc
func stop()
_soundstop($sound)
GUICtrlSetState($Button3, $GUI_DISABLE)
GUICtrlSetState($Button4, $GUI_DISABLE)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_enable)
GUICtrlSetState($menusong, $GUI_enable)
EndFunc
func _exit()
_soundclose($sound)
exit
endfunc
func resume()
_soundresume($sound)
GUICtrlSetState($Button3, $GUI_enable)
GUICtrlSetState($Button4, $GUI_DISABLE)
EndFunc
func pause()
_SoundPause($sound)
GUICtrlSetState($Button4, $GUI_Enable)
GUICtrlSetState($Button3, $GUI_DISABLE)
endfunc
mfg sith