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