0
0

Anyone know how to calculate this from a mp3? I’am a vb user, thanks in advance.

++Cire.

  • You must to post comments
0
0

Thanks brett, it’s indeed very easy.

Here’s the vb code :

Dim lenms As Long, lenbytes As Long, kbps as Long
lenms = FSOUND_Stream_GetLengthMs(stream)
lenbytes = FSOUND_Stream_GetLength(stream)
kbps = (lenbytes (lenms 1000)) * 8 1000

The ” is for the Integer division (use ‘/’ for floating point division)
The brackets where necesary because vb tried to divide lenbytes by ((lenms1000)*8) first.

  • You must to post comments
0
0

Just to make the trifecta, here’s the Delphi version. :smile:

var
lenms, lenbytes, kbps: Cardinal;
begin
lenms := FSOUND_Stream_GetLengthMs(stream);
lenbytes := FSOUND_Stream_GetLength(stream);
kbps := lenbytes div (lenms div 1000) div 1000 * 8;
end;

Untested, hand-converted from Brett’s source…

<font size=-1>[ This Message was edited by: Sly on 2002-02-27 14:08 ]</font>

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.