From 1ebd007f362ca084dc6ccf26ebc2e4e25a1047bb Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 13 Jun 2013 17:28:58 -0600 Subject: [PATCH] wrap things in brackets to correct percentage --- audio-mixer/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio-mixer/src/main.cpp b/audio-mixer/src/main.cpp index 60abe557ec..2394813ad2 100644 --- a/audio-mixer/src/main.cpp +++ b/audio-mixer/src/main.cpp @@ -381,8 +381,8 @@ int main(int argc, const char* argv[]) { // calculate the percentage value for time elapsed for this send (of the max allowable time) gettimeofday(&endSendTime, NULL); - float percentageOfMaxElapsed = (usecTimestamp(&endSendTime) - usecTimestamp(&beginSendTime)) - / BUFFER_SEND_INTERVAL_USECS * 100.0f; + float percentageOfMaxElapsed = ((float) (usecTimestamp(&endSendTime) - usecTimestamp(&beginSendTime)) + / BUFFER_SEND_INTERVAL_USECS) * 100.0f; if (percentageOfMaxElapsed > 0) { sumFrameTimePercentages += percentageOfMaxElapsed;