mIRC Home    About    Download    Register    News    Help

Print Thread
$insong.length/$inmp3.length bug #54470 14/10/03 02:34 AM
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.

Re: $insong.length/$inmp3.length bug #54471 14/10/03 09:59 AM
Joined: May 2003
Posts: 215
lammkott Offline
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
Re: $insong.length/$inmp3.length bug #54472 14/10/03 10:21 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
1ms different for me. smile

Re: $insong.length/$inmp3.length bug #54473 14/10/03 11:07 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
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!
Re: $insong.length/$inmp3.length bug #54474 14/10/03 11:42 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
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
Re: $insong.length/$inmp3.length bug #54475 14/10/03 11:31 PM
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.