Answer the question
In order to leave comments, you need to log in
How to display bitrate using bass.dll?
Hello. Why does this code not want to display the normal bitrate of the stream?
public static int stream;
public static double time;
public static long len;
public static int bitrate;
stream = Bass.BASS_StreamCreateURL(URL, 0, BASSFlag.BASS_DEFAULT, null, IntPtr.Zero);
time = Bass.BASS_ChannelBytes2Seconds(stream, Bass.BASS_ChannelGetLength(.stream));
len = Bass.BASS_StreamGetFilePosition(stream, BASSStreamFilePosition.BASS_FILEPOS_END);
bitrate = (int)((((double)len) / (125.0 * time)) + 0.5);
bitrateLabel.Text = bitrate.ToString();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question