[Flac] FLAC CD Archive

Charles Steinkuehler cstein at newtek.com
Tue Sep 26 14:39:51 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Phillips wrote:
> Charles Steinkuehler wrote:
>> Dan Phillips wrote:
>> >> What we are left with is a requirement in abcde to overcome this and
>> >> until then we have the manual method. Have you any thoughts on the best
>> >> way to overcome this problem apart from the hacked toc3cue (do you have
>> >> a copy of this?)
>>
>> I do not have a copy of toc3cue...I made my own hack to toc2cue to fix
>> it's behavior.  Can you send (or point me to) a copy?

It's a simple patch.  With apologies to the flac folks, here it is.

Further abcde and cuefile discussions should probably find a new home...

The first two changes add features to the cuefile output, but are not
strictly necessary (regardless, flac will stash the catalog and ISRC
values, if present, so they're not pointless).  The last group of
changed lines is what actually converts the PREGAP into an INDEX 00
entry in the cuefile (and appropriately alters subsequent entries).

naibed:/home/charles/cdrdao-1.2.1/utils# diff -u toc2cue.cc toc3cue.cc
- --- toc2cue.cc  2006-09-26 16:31:51.916312146 -0500
+++ toc3cue.cc  2006-07-18 11:42:03.894698979 -0500
@@ -286,6 +286,9 @@
     return 1;
   }

+  if (toc->catalogValid())
+    out << "CATALOG " << toc->catalog() << "\n";
+
   out << "FILE \"" << binFileName << "\" BINARY" << "\n";

   long offset = 0;
@@ -326,13 +329,18 @@
       out << "    FLAGS DCP\n";
     }

+    if (trun->isrcValid() )
+      out << "    ISRC " << trun->isrc() << "\n";
+
     const SubTrack *strun;
     SubTrackIterator stitr(trun);
     int pregap = 0;

     for (strun = stitr.first(); strun != NULL; strun = stitr.next()) {
       if (strun->TrackData::type() == TrackData::ZERODATA) {
- -       out << "    PREGAP " << trun->start().str() << "\n";
+//     out << "    PREGAP " << trun->start().str() << "\n";
+       out << "    INDEX 00 00:00:00\n";
+       offset += trun->start().lba();
        pregap = 1;
       }
       else {


- --
Charles Steinkuehler
cstein at newtek.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFFGZ4nenk4xp+mH40RAvJTAJ9TPIlQqf3dmJLT3sAaKxZieo+o2QCaA304
aKbvO4t063/SdiXKVlKGHt8=
=/Eu+
-----END PGP SIGNATURE-----


More information about the Flac mailing list