# HG changeset patch # User Eric Wing # Date 1351206770 25200 # Node ID 714ec6c5789d9373e661ee1140cdcd884f79a96d # Parent 40078d025b73b4e25e351a72d906c7ae03485cbd Fixed a unit conversion bug in the Ogg Tremor decoder for SoundDecoder. This fixes out of memory issues with LoadAll on long, but still reasonably sized .ogg files on some Android devices. Ogg Vorbis uses seconds and we multiply by 1000 to convert to milliseconds. But Ogg Tremor already uses milliseconds but I was still multiplying by 1000. (The Tremor decoder was derived from the Vorbis decoder so this is actually the second time I hit a bug like this.) diff -r 40078d025b73 -r 714ec6c5789d Isolated/LGPL/oggtremor.c --- a/Isolated/LGPL/oggtremor.c Mon Aug 13 16:11:30 2012 -0700 +++ b/Isolated/LGPL/oggtremor.c Thu Oct 25 16:12:50 2012 -0700 @@ -217,7 +217,7 @@ if (OV_EINVAL == total_time) internal->total_time = -1; else - internal->total_time = (int32_t)(total_time * 1000.0 + 0.5); + internal->total_time = (int32_t)(total_time); /*