libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] cd-text not working for bin/cue driver?


From: Robert William Fuller
Subject: Re: [Libcdio-devel] cd-text not working for bin/cue driver?
Date: Thu, 18 Oct 2012 06:53:51 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6

You mean like a unit test? I was hoping that it was just something bone-headed that I was doing with the new interface and it would be obvious and easily fixed. Probably, the easiest thing to do is to modify one of the unit tests to check cd-text fields from a .cue file. I'll try to get to it but I have to work Sunday--something about installing a new core network switch while nobody is working--so it might be a little while.

On 10/17/2012 10:57 PM, Rocky Bernstein wrote:
It would help to have a some complete small standalone code (akin to the
code in examples)  that we could use in a test rather than a function
extracted from some larger piece of code.

Thanks.

On Wed, Oct 17, 2012 at 6:53 PM, Robert William Fuller<
address@hidden>  wrote:

As promised, I have started testing with libcdio from git.  I am seeing
what might be some problems with the new cd-text support.  Specifically, I
am reading a bin/cue image and it does not seem to be getting the cd-text
fields from the cue file.  It works with 0.83, but not with git.

I will include my code and the cue file.  The code is part of my
cd-ripper.  It prints out the cd-text fields as part of creating a new cue
sheet.  Maybe I am doing something wrong with the new interface. Here's my
code:

void cdio2_fprint_cd_text(FILE *cueFile, CdIo_t *cdObj, track_t track,
const char *prefix)
{
     int i, quoted;
     cdtext_t *cdtext;
     const char *field;

#ifdef CUED_HAVE_CDTEXT_V2
     cdtext = cdio_get_cdtext(cdObj);
#else
     cdtext = cdio_get_cdtext(cdObj, track);
#endif

     if (cdtext) {
         for (i = MIN_CDTEXT_FIELD;  i<  MAX_CDTEXT_FIELDS;  ++i) {
#ifdef CUED_HAVE_CDTEXT_V2
             field = cdtext_get_const(cdtext, (cdtext_field_t) i, track);
#else
             field = cdtext_get_const((cdtext_**field_t) i, cdtext);
#endif
             // checking for field[0] is for Nero, which sometime has zero
length
             if (field&&  field[0]) {
                 quoted = strchr(field, ' ') ? 1 : 0;
                 fprintf(cueFile, "%s%s %s%s%s\n", prefix,
cdtext_field2str((cdtext_**field_t) i),
                     quoted ? "\"" : "", field, quoted ? "\"" : "");
             }
         }
     }
}

Here is the cue file that was read by the libcdio bin/cue driver:

REM DISCID 8E09C30B
REM COMMENT "ExactAudioCopy v0.95b4"
PERFORMER "The Band"
TITLE "Music From Big Pink"
FILE "The Band - Music From Big Pink.wav" WAVE
   TRACK 01 AUDIO
     TITLE "Tears Of Rage"
     PERFORMER "The Band"
     INDEX 01 00:00:00
   TRACK 02 AUDIO
     TITLE "To Kingdome Come"
     PERFORMER "The Band"
     INDEX 00 05:17:18
     INDEX 01 05:21:19
   TRACK 03 AUDIO
     TITLE "In A Station"
     PERFORMER "The Band"
     INDEX 00 08:37:34
     INDEX 01 08:42:16
   TRACK 04 AUDIO
     TITLE "Caledonia Mission"
     PERFORMER "The Band"
     INDEX 00 12:09:39
     INDEX 01 12:14:59
   TRACK 05 AUDIO
     TITLE "The Weight"
     PERFORMER "The Band"
     INDEX 00 15:07:33
     INDEX 01 15:12:40
   TRACK 06 AUDIO
     TITLE "We Can Talk"
     PERFORMER "The Band"
     INDEX 00 19:43:60
     INDEX 01 19:48:38
   TRACK 07 AUDIO
     TITLE "Long Black Veil"
     PERFORMER "The Band"
     INDEX 00 22:49:12
     INDEX 01 22:53:34
   TRACK 08 AUDIO
     TITLE "Chest Fever"
     PERFORMER "The Band"
     INDEX 00 25:52:20
     INDEX 01 25:57:08
   TRACK 09 AUDIO
     TITLE "Lonesome Suzie"
     PERFORMER "The Band"
     INDEX 00 31:07:51
     INDEX 01 31:12:37
   TRACK 10 AUDIO
     TITLE "This Wheel's On Fire"
     PERFORMER "The Band"
     INDEX 00 35:10:43
     INDEX 01 35:14:40
   TRACK 11 AUDIO
     TITLE "I Shall Be Released"
     PERFORMER "The Band"
     INDEX 00 38:24:66
     INDEX 01 38:27:22







reply via email to

[Prev in Thread] Current Thread [Next in Thread]