Using cue2toc, I generated this toc file, which has many PREGAP statements.
This:
cdrdao show-toc cdimage.toc
Generates one error for each PREGAP statement:
ERROR: cdimage.toc:9: START 00:03:02 behind or at track end.
ERROR: cdimage.toc:13: START 00:02:00 behind or at track end.
ERROR: cdimage.toc:17: START 00:00:03 behind or at track end.
(...)
I compiled an older version of cdrdao (v1.1.9), and it correctly parsed the file:
TOC TYPE: CD_ROM
TRACK 1 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
START 00:00:00( 0)
END* 00:44:70( 3370)
TRACK 2 Mode MODE1:
COPY NOT PERMITTED
PREGAP 00:03:02( 227)
START 00:47:72( 3597)
END 11:45:26( 52901)
TRACK 3 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:02:00( 150)
START 11:47:26( 53051)
END* 16:12:00( 72900)
TRACK 4 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:00:03( 3)
START 16:12:03( 72903)
END* 17:35:58( 79183)
So the older version was able to burn the image just fine.
TOC file
Actually, the problem is not with the PREGAP parsing, but with cdrdao not calculating the length of the audio files... this occurs most with the PREGAP statement.
This file:
CD_DA
TRACK AUDIO
AUDIOFILE "test.wav" 00:00:00 00:10:00
TRACK AUDIO
START 00:02:00
AUDIOFILE "test.wav" 00:10:00
Has the 'show-toc' output of:
TOC TYPE: CD_DA
TRACK 1 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
START 00:00:00( 0)
END 00:10:00( 750)
TRACK 2 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:02:00( 150)
START 00:12:00( 900)
END* 00:48:62( 3662)
But this one:
CD_DA
TRACK AUDIO
AUDIOFILE "test.wav" 00:00:00 00:10:00
TRACK AUDIO
PREGAP 00:02:00
AUDIOFILE "test.wav" 00:10:00
cdrdao 1.2.2 gives the following:
ERROR: cdimage.toc:9: START 00:02:00 behind or at track end.
TOC TYPE: CD_DA
TRACK 1 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
START 00:00:00( 0)
END 00:10:00( 750)
TRACK 2 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:02:00( 150)
START 00:12:00( 900)
END* 00:50:62( 3812)
Now, cdrdao 1.1.9 parses the first file (the one with START) as:
TOC TYPE: CD_DA
TRACK 1 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
START 00:00:00( 0)
END 00:10:00( 750)
TRACK 2 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:02:00( 150)
START 00:12:00( 900)
END* 00:48:62( 3662)
And the second one (the one with PREGAP) as:
TOC TYPE: CD_DA
TRACK 1 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
START 00:00:00( 0)
END 00:10:00( 750)
TRACK 2 Mode AUDIO:
COPY NOT PERMITTED
NO PRE-EMPHASIS
TWO CHANNEL AUDIO
PREGAP 00:02:00( 150)
START 00:12:00( 900)
END* 00:50:62( 3812)
Notice the different sector ending? Now, this file:
CD_DA
TRACK AUDIO
AUDIOFILE "test.wav" 00:00:00 00:10:00
TRACK AUDIO
SILENCE 00:02:00
START
AUDIOFILE "test.wav" 00:10:00
cdrdao 1.1.9 gives the SAME output as the file with only the PREGAP on the second track, while latter versions show the error again.
This bug seems to occur since v1.2.0...
This issue has been analyzed and fixed elsewhere; see <a href="http://www.nabble.com/Bug-440419:-ERROR:--...--START-00:02:00-behind-or-at-track-end.-td12439735.html">this debian-bugs-dist post</a>, which even contains a source code patch.
I believe the patch that fixes this is currently in CVS, and is part of cdrdao 1.2.3rc2 available here:
http://www.poolshark.org/src/cdrdao-1.2.3rc2.tar.bz2
Could you please verify this bug is fixed there ?
Thanks.
poolshark, I can try to verify if you can provide me a win32 build of 1.2.3rc2. I don't use Linux/Cygwin at all and have no idea how to compile the source for the win32 platform.
Somebody had posted win32 build recently:
http://homepages.tu-darmstadt.de/~pkrueger/