mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 155
S
Strider Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 155
$insong.length doesn't return the correct length of an mp3 in miliseconds.

Just play an mp3 with /splay -p and then type:

//echo -a $insong.length $sound($insong.fname).length

You get different values, when both of them should be the same. The second value is the correct one.

Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
I tried this with several different MP3s and they all returned the same length for both $insong.length and $sound().length


- Jason
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
1ms different for me. smile

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
the 1ms diverence is the parse time mIRC takes for it I guess :-]


If it ain't broken, don't fix it!
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The difference is because $sound() calculates the duration by reading from the mp3 file itself, while $insong.length gets the duration from Windows' MCI system (which is responsible for playing the sounds). So there's probably nothing mirc can do to resolve this issue.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 155
S
Strider Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 155
Yeah, you're right. That was my initial thought too, but since this behavior "started" after I installed mIRC 6.1, I thought that it was an mIRC bug; but now I know that it was just a coincidence.

Only a set of songs I recently ripped from a sampler CD I got do this and, after downgrading to 6.1, I tested the identifiers and they return the same values they do in 6.11/6.12. And now I know for sure that it's not mIRC's fault.


Link Copied to Clipboard