Hi, Brett.
It is the longest day today.
I should still kill a few hours to call it a day. :(

I used the getPosition() to figure out the bitrate of a network stream.

Channel->getPosition(&nCurrMS, FMOD_TIMEUNIT_MS);//—A
Channel->getPosition(&nCurrByte, FMOD_TIMEUNIT_RAWBYTES);//—B
int nKBPS = (int)((float)(nCurrByte) /(float)(nCurrMS) * 2*4);

Channel = 0;

Of course, this code worked perfectly before I stopped and resumed a network stream. when I stopped and resumed a network stream, statement A counted milliseconds from 0, but statement B counted raw bytes from the previous position(stopped position). So nKBPS was too big.

I need your help to solve it.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.