mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2015
Posts: 101
klez Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2015
Posts: 101
Hi! I've found an bug on mp3's length return values. I don't know why, but on some songs (not all) the $sound().length and $insong.length return different values.

For example, i have a song located at: C:\Users\User\Music\2pac ft. Outlawz - Scars.mp3

When i type:

echo -a $sound("C:\Users\User\Music\2pac ft. Outlawz - Scars.mp3").length it returns: 285649 (i.e. 4 minutes 45 seconds)

When i type: /splay "C:\Users\User\Music\2pac ft. Outlawz - Scars.mp3" and when playing i execute /echo -a $insong.length ir returns: 1142649 (i.e. 19 minutes 20 seconds).

When i open this mp3 in Aimp or Winamp or something else it returns correct value: 4 minutes 45/46 seconds

So, the problem is in $insong.length as i guess. I match this problem on some mp3's, but in else both identifiers return correct values.

If Khaled wants to see this mp3, i can give a link for download this mp3, as example.

P.S. Tested on mIRC 7.47, without any scripts (clean mIRC).

Last edited by klez; 09/03/17 12:26 PM.
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for your bug report. This issue is reported every so often. Unfortunately, the situation has not changed (see other thread). Windows has not updated its MCI sound support to handle VBR files, so there is little mIRC can do about it.

One possible option might be to switch from using MCI to DirectShow (which should hopefully handle VBR), however that would require a hefty rewrite of the sound playing routines/events.

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
I have implemented support for DirectSound in the latest beta, which, I am hoping, resolves the issue with VBR MP3s. Could you let me know if $insong works any better with the latest beta? The new sound routines also affect all sound-related features in mIRC, including /splay and so on. If you could test this with a variety of MP3, wave, mid, etc. files that would be appreciated.

Joined: Sep 2015
Posts: 101
klez Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2015
Posts: 101
I've tested with the same song that is mentioned in my post and now it's showing the real time, both $insong and $sound

echo -a $sound("C:\Users\User\Music\2pac ft. Outlawz - Scars.mp3").length returns 285649

and i put it to play through /splay:

echo -a $insong.lenght returns 285648

So, the difference is in 1, that is not so important, but both identifiers return true values.

I'll test further with other audio files and i'll post if i find any difference.

P.S. I want to mention that the song above is VBR file that is showing in another audio players and in Adobe Audition CC also, but when i issue in mIRC:

echo -a $sound("C:\Users\User\Music\2pac ft. Outlawz - Scars.mp3").vbr returns $false

Other data like bitrate, sample etc. return correct values.

Last edited by klez; 27/03/17 06:10 AM.
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks, the .vbr property has been fixed for the next beta.


Link Copied to Clipboard