Jump to content
Sign in to follow this  
PcExpert

Detecting sound Length

Recommended Posts

PcExpert

Hi all,

How to detect the Sound Length of an MP3 file? I tried the function _SoundLength() , but it keeps returning 00:00:00, And I'm sure the path I specified is right. please help me.

The code I used:

#include <Sound.au3>

$sound = _SoundLength("Directory\MyMP3.mp3", 1)
MsgBox(0, "Sound Length", $sound)

Thanks!

Edited by PcExpert

Share this post


Link to post
Share on other sites
d4rk

From the help file :

#include <Sound.au3>

_SoundLength ( $sSnd_id [, $iMode ] )

;----------

Parameters

$sSnd_id Sound ID (the 'alias') as returned by _SoundOpen or a file

so you need a Sound ID, not a specific path

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
PcExpert

But the helpfile also tells me this:

$sSnd_idSound ID (the 'alias') as returned by _SoundOpen or a file

'or a file' so it must be possible to use a path, right?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×