[Abcde-users] Single flac file with embedded cuesheet is missing the first few sectors

Matthias König mk at silverserver.at
Sun Oct 2 23:00:21 BST 2016


I think I have found a solution.

READTRACKNUMS="0-" ;;

That’s not the right way to tell cdparanoia to rip from the beginnig of
the CD. If there is no track number 0 cdparanoia will fail because of
scsi read errors.

That’s the right way to rip from the beginning of each CD:

READTRACKNUMS="-- -$LASTTRACK" ;;

With this cdparanoia always starts to rip from sector 0. It works well
with both kind of CDs, those whose first track starts at sector 0 and
those whose first track starts at sector 32.

>From the cdparanoia man page:

    Extract from the beginning of the disc up through track 3:
    cdparanoia -- -3
    The "--" above is to distinguish "-3" from an option flag.


I have added an attachment. The changes are on lines 3285 and 3289.

I tested this with both kind of CDs and everything worked flawlessly.

Matthias König
-------------- next part --------------
3272 do_cdread ()
3273 {
3274         # The commands here don't go through run_command because they're never supposed to be silenced
3275         # return codes need to be doublechecked anyway, however
3276         if [ "$1" = "onetrack" ]; then
3277                 # FIXME # Add the possibility of grabbing ranges of tracks in onetrack
3278                 # FIXME # Until then, we grab the whole CD in one track, no matter what
3279                 # the user said
3280                 # We need the first and last track for cdda2wav/icedax
3281                 FIRSTTRACK=$2
3282                 LASTTRACK=$(expr $3 + 0)
3283                 UTRACKNUM=$FIRSTTRACK
3284                 case "$CDROMREADERSYNTAX" in
3285                         flac) READTRACKNUMS="-" ;;
3286                         cdparanoia|libcdio)
3287                                 #XX FIXME XX
3288                                 # Add a variable to check if tracks are provided in command line and if not, use "0-" to rip the tracks
3289                                 READTRACKNUMS="-- -$LASTTRACK" ;;
3290                         cdda2wav | icedax) READTRACKNUMS="$FIRSTTRACK+$LASTTRACK" ;;
3291                         pird) READTRACKNUMS="$FIRSTTRACK..$LASTTRACK" ;;
3292                         *) echo "abcde error: $CDROMREADERSYNTAX does not support ONETRACK mode"
3293                                 exit 1 ;;


More information about the Abcde-users mailing list