libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] CD_MSF_FORMAT vs LBA on NetBSD


From: Thomas Schmitt
Subject: Re: [Libcdio-devel] CD_MSF_FORMAT vs LBA on NetBSD
Date: Sat, 01 Dec 2018 20:40:00 +0100

Hi,

Edd Barrett wrote:
> I've finally found some time to look at this. The following diff seems
> to work, although I don't think I have any CDs where the first track
> number isn't 1 to test with.

Commercial test candidates would be second CDs of a multi-CD album.

Self-made CDs can get arbitrary start track numbers by the .cue file format
which is understood (among others) by cdrdao, cdrecord, wodim, cdrskin.
(See "Example of a CDRWIN cue sheet file named NIGHTCATS.CUE" in
   https://dev.lovelyhq.com/libburnia/libburn/raw/master/doc/cdtext.txt
 where "TRACK 01 AUDIO" could be "TRACK 07 AUDIO" followed by tracks 08
 and 09.  Maximum permittable track number is 99.)

cdrskin has an option cd_start_tno= for a run with just a few .wav files.
Like:

  cdrskin -v dev=/dev/rcd0d cd_start_tno=7 trackA.wav trackB.wav trackC.wav


> https://github.com/vext01/libcdio/commit/d04c48e36e7bb810dede415950a8cdf69e625e0a

The changes look good so far.

But a gesture in lib/driver/gnu_linux.c (and also lib/driver/solaris.c)
still differs from the one in lib/driver/netbsd.c.

------------------- gnu_linux.c:

   if (i_track == CDIO_CDROM_LEADOUT_TRACK)
     i_track = p_env->gen.i_tracks + p_env->gen.i_first_track;


------------------- netbsd.c:

  #define TOTAL_TRACKS (_obj->tochdr.ending_track \
                         - _obj->tochdr.starting_track + 1)
  ...
   if (track_num == CDIO_CDROM_LEADOUT_TRACK)
           track_num = TOTAL_TRACKS + 1;

TOTAL_TRACKS looks like the number of tracks on the CD.

But both, gnu_linux.c and now also netbsd.c consider

  (_obj->gen.i_first_track + _obj->gen.i_tracks)

as highest permissible value of the nominal track number (i_track and
track_num, respectively). That's one higher than the highest nominal
track number found on CD.

So i guess that netbsd.c should now join gnu_linux.c in setting the
nominal track number of the lead-out track to that value.


Have a nice day :)

Thomas




reply via email to

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