Package: abcde
Version: 2.4.1-1
Severity: important
Tags: patch

The builtin routine to compute leadin/leadout info from cue files
leads to wrong values.  The problem is that you divide before you
multiple - in that case, the division can lead to a float which
shells rounds to integer.  The solution is to multiply before
doing the division.

My fix has been tested with 500 FLAC files.

Example of problem:

>>> 34722576 / 44100 * 75
59025 # wrong
>>> 34722576 * 75 / 44100
59052 # correct


--- abcde~      2010-05-18 22:06:37.000000000 +0100
+++ abcde       2010-05-18 22:06:59.000000000 +0100
@@ -1754,8 +1754,8 @@
                                                                
#OFFSETS[${#OFFSETS[*]}]=$(( 10#${OFFSETTIME:0:2} * 4500 + 10#${OFFSETTIME:3:2} 
* 75 + 10#${OFFSETTIME:6:2} ))
                                                        done
 
-                                                       LEADOUT=$(( $(echo 
"$CUESHEET" | grep lead-out | get_last) / 44100 * 75 ))
-                                                       LEADIN=$(( $(echo 
"$CUESHEET" | grep lead-in | get_last) / 44100 * 75 ))
+                                                       LEADOUT=$(( $(echo 
"$CUESHEET" | grep lead-out | get_last) * 75 / 44100 ))
+                                                       LEADIN=$(( $(echo 
"$CUESHEET" | grep lead-in | get_last) * 75 / 44100 ))
                                                        makeids
                                                ;;
                                                *)

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to