Fixed int->double truncation in duration calculation

This commit is contained in:
Thong Nguyen 2015-12-07 12:59:32 +00:00
parent 5909657368
commit 8fa821a944
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@
{
if (processedPacketsCount > STK_BIT_RATE_ESTIMATION_MIN_PACKETS_PREFERRED || (audioStreamBasicDescription.mBytesPerFrame == 0 && processedPacketsCount > STK_BIT_RATE_ESTIMATION_MIN_PACKETS_MIN))
{
double averagePacketByteSize = processedPacketsSizeTotal / processedPacketsCount;
double averagePacketByteSize = (double)processedPacketsSizeTotal / (double)processedPacketsCount;
retval = averagePacketByteSize / packetDuration * 8;