From a54f6ecfe56dc707142d1ca8f21025c4300f0108 Mon Sep 17 00:00:00 2001 From: vspader Date: Wed, 20 Feb 2008 01:09:15 +0000 Subject: [PATCH] Fixed bitrate calculation. --- Plugins/MAD/MADDecoder.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index bf03e5476..7cbecda37 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -45,7 +45,7 @@ int samplesPerMPEGFrame = 0; int id3_length = 0; - + mad_stream_init (&stream); mad_frame_init (&frame); @@ -271,7 +271,7 @@ } } - bitrate = (((_fileSize - id3_length)*8)/1000) * (sampleRate/totalFrames); + bitrate = ((double)((_fileSize - id3_length)*8)/1000.0) * (sampleRate/(double)totalFrames); mad_frame_finish (&frame); mad_stream_finish (&stream);