Just to make the trifecta, here’s the Delphi version.
lenms, lenbytes, kbps: Cardinal;
lenms := FSOUND_Stream_GetLengthMs(stream);
lenbytes := FSOUND_Stream_GetLength(stream);
kbps := lenbytes div (lenms div 1000) div 1000 * 8;
Untested, hand-converted from Brett’s source…
<font size=-1>[ This Message was edited by: Sly on 2002-02-27 14:08 ]</font>
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.
- Adion answered 16 years ago
Please login first to submit.