Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

_SoundLength

$
0
0

How to know the duration of an mp3 file using the _SoundLength function?

I've made this:

AutoIt         
;Made by TheWebZ #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Sound.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Music Player", 615, 438, 192, 124) $Button1 = GUICtrlCreateButton("Play", 160, 312, 265, 97) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         Case $Button1             $musica = FileOpenDialog( "Choose your music file", "", "Musica(*.mp3)", 2 )             $som = _SoundOpen( $musica )             $Tempo = _SoundLength( $som )             MsgBox( 16, "Music Length", "Length: " & $Tempo )             SoundPlay( $musica, 0 )     EndSwitch WEnd

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>