Author: abock
Date: 2006-01-14 14:35:32 -0500 (Sat, 14 Jan 2006)
New Revision: 55578
Modified:
trunk/entagged-sharp/src/Ogg/Util/OggInfoReader.cs
Log:
2006-01-14 Aaron Bockover <[EMAIL PROTECTED]>
* src/Ogg/Util/OggInfoReader.cs: Fixed bitrate calculation oversight by
using duration.TotalSeconds (was duration.Seconds, which is remainging)
Modified: trunk/entagged-sharp/src/Ogg/Util/OggInfoReader.cs
===================================================================
--- trunk/entagged-sharp/src/Ogg/Util/OggInfoReader.cs 2006-01-14 19:25:54 UTC
(rev 55577)
+++ trunk/entagged-sharp/src/Ogg/Util/OggInfoReader.cs 2006-01-14 19:35:32 UTC
(rev 55578)
@@ -109,7 +109,7 @@
info.Vbr = true;
}
else {
- info.Bitrate = ComputeBitrate(
info.Duration.Seconds, raf.Length );
+ info.Bitrate = ComputeBitrate(
info.Duration.TotalSeconds, raf.Length );
info.Vbr = true;
}
@@ -117,7 +117,7 @@
}
private int ComputeBitrate( int length, long size ) {
- return (int) ( ( size / 1000 ) * 8 / length );
+ return (int) ( ( size / 1024 ) * 8 / length );
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches