Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
$sound(file.mp3).length not reporting right
Forums
Active Threads
Search
Who's Online
Help
Print Thread
$sound(file.mp3).length not reporting right
#
259851
05/02/17
07:49 PM
Joined:
Aug 2015
Posts: 71
USA
_entropy
OP
Babel fish
OP
_entropy
Babel fish
Joined:
Aug 2015
Posts: 71
USA
$sound(file.mp3).length returns 353860...
-
//echo . $asctime(353860,nn:ss)
Returns: 17:40 (which is wrong)
//echo . $duration(353860)
Returns: 4days 2hrs 17mins 40secs (which is wrong)
Last edited by _entropy;
05/02/17
08:55 PM
.
mIRC Scripts IRC Network: irc://irc.mircscripts.info/chat
Copy Link to Clipboard
Re: $sound(file.mp3).length not reporting right
_entropy
#
259857
05/02/17
11:39 PM
Joined:
Dec 2002
Posts: 5,519
London, UK
Khaled
Hoopy frood
Khaled
Hoopy frood
Joined:
Dec 2002
Posts: 5,519
London, UK
$sound().length returns a millisecond value. Also note that $asctime() is not useful in this context since it takes a $ctime value and returns a time value not a length value.
Copy Link to Clipboard
Re: $sound(file.mp3).length not reporting right
_entropy
#
259913
10/02/17
02:11 PM
Joined:
Aug 2016
Posts: 36
West Oz
ruprecht
Ameglian cow
ruprecht
Ameglian cow
Joined:
Aug 2016
Posts: 36
West Oz
Yes, as the boss says, length in miliseconds... divide by 1000 to get the correct result.
Code:
%msl = $sound(file.mp3).length %len = $duration($calc(%msl/1000))
Returns 5mins 53secs for your example.
Copy Link to Clipboard
Hop To
News and Discussions ------
Latest News
General Discussion
Support ------
mIRC Help
Connection Issues
Scripts & Popups
Development ------
Feature Suggestions
Developers
Bug Reports
Print Thread
Switch to Threaded Mode
Show Likes
Link Copied to Clipboard
View Profile
Private Message
Website
Follow User
Forum Posts
View Profile
Private Message
Website
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage