mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 153
S
Strider Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 153
$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
L
Fjord artisan
Offline
Fjord artisan
L
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

I
Iori
Iori
I
1ms different for me. smile

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

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
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.

Joined: Dec 2002
Posts: 153
S
Strider Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 153
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