int ReadTocHeader(int fd) { cdrom_tochdr th = new cdrom_tochdr(); cdrom_multisession ms = new cdrom_multisession(); int ret = read_toc_header(fd, ref th); if (ret < 0) { return(ret); } first_track = th.cdth_trk0; last_track = th.cdth_trk1; ms.addr_format = CDROM_LBA; ret = read_multisession(fd, ref ms); if (ms.xa_flag != 0) { last_track--; } return(ret); }
int ReadLeadout(int fd, ref ulong lba) { cdrom_multisession ms = new cdrom_multisession(); ms.addr_format = CDROM_LBA; int ret = read_multisession(fd, ref ms); if (ms.xa_flag != 0) { lba = (ulong)(ms.lba - XA_INTERVAL); return(ret); } return(ReadTocEntry(fd, CDROM_LEADOUT, ref lba)); }
static int read_multisession(int fd, ref cdrom_multisession multisession) { return(read_multisession(fd, CDROMMULTISESSION, ref multisession)); }
static extern int read_multisession(int fd, int request, ref cdrom_multisession multisession);
int ReadTocHeader(int fd) { cdrom_tochdr th = new cdrom_tochdr (); cdrom_multisession ms = new cdrom_multisession (); int ret = read_toc_header (fd, ref th); if (ret < 0) return ret; first_track = th.cdth_trk0; last_track = th.cdth_trk1; ms.addr_format = CDROM_LBA; ret = read_multisession (fd, ref ms); if(ms.xa_flag != 0) last_track--; return ret; }
int ReadLeadout(int fd, ref ulong lba) { cdrom_multisession ms = new cdrom_multisession (); ms.addr_format = CDROM_LBA; int ret = read_multisession (fd, ref ms); if (ms.xa_flag != 0) { lba = (ulong)(ms.lba - XA_INTERVAL); return ret; } return ReadTocEntry (fd, CDROM_LEADOUT, ref lba); }
static int read_multisession(int fd, ref cdrom_multisession multisession) { return read_multisession (fd, CDROMMULTISESSION, ref multisession); }