FTBFS: <sys/sysmacros.h> included where "major" and "minor" macros are in use
[cdrkit.git] / cdrkit-1.1.11-paranoiacdda.patch
blob062971ddd3afb5c1b6d77e0e1ac4e97af753e3ac
1 diff -up cdrkit-1.1.11/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/CMakeLists.txt
2 --- cdrkit-1.1.11/CMakeLists.txt.paranoiacdda 2012-07-31 14:27:15.166155309 +0200
3 +++ cdrkit-1.1.11/CMakeLists.txt 2012-07-31 14:27:28.469613175 +0200
4 @@ -1,3 +1,3 @@
5 PROJECT (cdrkit C)
6 -SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
7 +SUBDIRS(include genisoimage wodim libedc libhfs_iso icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
9 diff -up cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/icedax/CMakeLists.txt
10 --- cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda 2012-07-31 14:27:15.228157411 +0200
11 +++ cdrkit-1.1.11/icedax/CMakeLists.txt 2012-07-31 14:27:15.239157786 +0200
12 @@ -1,8 +1,9 @@
13 PROJECT (icedax C)
14 -INCLUDE_DIRECTORIES(../include ../wodim ../libparanoia ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
15 +INCLUDE_DIRECTORIES(../include ../wodim ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
16 include(../include/AddScgBits.cmake)
17 include(../include/AddSchilyBits.cmake)
18 include(../include/AddNetworkBits.cmake)
19 +INCLUDE (CheckLibraryExists)
21 FIND_FILE (HAVE_SYS_SOUNDCARD_H sys/soundcard.h)
22 IF(HAVE_SYS_SOUNDCARD_H)
23 @@ -18,12 +19,20 @@ IF(HAVE_LIBOSSAUDIO)
24 LIST(APPEND EXTRA_LIBS "ossaudio")
25 ENDIF(HAVE_LIBOSSAUDIO)
27 -LIST(APPEND EXTRA_LIBS paranoia)
28 +CHECK_INCLUDE_FILES(cdda/cdda_interface.h HAVE_CDDA_INTERFACE_H)
29 +CHECK_LIBRARY_EXISTS (cdda_paranoia paranoia_init "" HAVE_LIBPARANOIA)
30 +IF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
31 + LIST(APPEND EXTRA_LIBS cdda_paranoia cdda_interface)
32 +ELSE(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
33 + MESSAGE(FATAL_ERROR "You need cdparanoia library installed")
34 +ENDIF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
36 +LIST(APPEND EXTRA_LIBS)
37 IF (WIN32)
38 LIST(APPEND EXTRA_LIBS winmm)
39 ENDIF (WIN32)
41 -LINK_DIRECTORIES(../librols ../libusal ../libparanoia)
42 +LINK_DIRECTORIES(../librols ../libusal)
43 ADD_EXECUTABLE (icedax aifc.c aiff.c base64.c icedax.c interface.c ioctl.c raw.c resample.c ringbuff.c scsi_cmds.c semshm.c setuid.c sha_func.c sndconfig.c sun.c toc.c wav.c)
44 TARGET_LINK_LIBRARIES(icedax wodimstuff ${EXTRA_LIBS})
45 SET_TARGET_PROPERTIES(icedax PROPERTIES SKIP_BUILD_RPATH TRUE)
46 diff -up cdrkit-1.1.11/icedax/global.h.paranoiacdda cdrkit-1.1.11/icedax/global.h
47 --- cdrkit-1.1.11/icedax/global.h.paranoiacdda 2012-07-31 14:27:15.232157548 +0200
48 +++ cdrkit-1.1.11/icedax/global.h 2012-07-31 14:27:15.226157345 +0200
49 @@ -17,7 +17,8 @@
50 #include "md5.h"
51 #endif
52 #ifdef USE_PARANOIA
53 -#include "cdda_paranoia.h"
54 +#include <cdda/cdda_interface.h>
55 +#include <cdda/cdda_paranoia.h>
56 #endif
58 typedef struct index_list
59 @@ -102,10 +103,10 @@ typedef struct global
61 struct paranoia_parms_t
63 - Ucbit disable_paranoia:1;
64 - Ucbit disable_extra_paranoia:1;
65 - Ucbit disable_scratch_detect:1;
66 - Ucbit disable_scratch_repair:1;
67 + char disable_paranoia:1;
68 + char disable_extra_paranoia:1;
69 + char disable_scratch_detect:1;
70 + char disable_scratch_repair:1;
71 int retries;
72 int overlap;
73 int mindynoverlap;
74 diff -up cdrkit-1.1.11/icedax/icedax.c.paranoiacdda cdrkit-1.1.11/icedax/icedax.c
75 --- cdrkit-1.1.11/icedax/icedax.c.paranoiacdda 2012-07-31 14:27:15.237157718 +0200
76 +++ cdrkit-1.1.11/icedax/icedax.c 2012-07-31 14:27:15.238157752 +0200
77 @@ -120,6 +120,10 @@
78 #ifdef USE_LAME
79 #include "mp3.h" /* mp3 file handling */
80 #endif
81 +#ifdef USE_PARANOIA
82 +#include <cdda/cdda_interface.h>
83 +#include <cdda/cdda_paranoia.h>
84 +#endif
85 #include "interface.h" /* low level cdrom interfacing */
86 #include "icedax.h"
87 #include "resample.h"
88 @@ -128,9 +132,6 @@
89 #include "ringbuff.h"
90 #include "global.h"
91 #include "exitcodes.h"
92 -#ifdef USE_PARANOIA
93 -#include "cdda_paranoia.h"
94 -#endif
95 #include "defaults.h"
97 static void RestrictPlaybackRate(long newrate);
98 @@ -800,7 +801,7 @@ static void init_globals()
99 global.useroverlap = -1; /* amount of overlapping sectors user override */
100 global.need_hostorder = 0; /* processing needs samples in host endianess */
101 global.in_lendian = -1; /* input endianess from SetupSCSI() */
102 - global.outputendianess = NONE; /* user specified output endianess */
103 + global.outputendianess = NONE_EN; /* user specified output endianess */
104 global.findminmax = 0; /* flag find extrem amplitudes */
105 #ifdef HAVE_LIMITS_H
106 global.maxamp[0] = INT_MIN; /* maximum amplitude */
107 @@ -2418,7 +2419,7 @@ Rate Divider Rate Divider
108 if (bulk == -1) bulk = 0;
110 global.need_big_endian = global.audio_out->need_big_endian;
111 - if (global.outputendianess != NONE)
112 + if (global.outputendianess != NONE_EN)
113 global.need_big_endian = global.outputendianess == BIG;
115 if (global.no_file) global.fname_base[0] = '\0';
116 @@ -2602,7 +2603,7 @@ Rate Divider Rate Divider
117 fputs( ", soundcard", stderr );
118 #endif
119 #if defined USE_PARANOIA
120 - fputs( ", libparanoia", stderr );
121 + fputs( ", libcdda_paranoia", stderr );
122 #endif
123 fputs( " support\n", stderr );
125 @@ -2892,8 +2893,28 @@ Rate Divider Rate Divider
126 #ifdef USE_PARANOIA
127 if (global.paranoia_selected) {
128 long paranoia_mode;
129 + cdrom_drive *tmpdrive;
130 + usal_close(get_scsi_p());
132 - global.cdp = paranoia_init(get_scsi_p(), global.nsectors);
133 + tmpdrive = cdda_identify(global.dev_name, 0, NULL);
134 + if (!tmpdrive)
136 + fputs("Can't identify disc\n", stderr);
137 + return 1;
140 + if(global.nsectors)
142 + tmpdrive->nsectors = global.nsectors;
143 + tmpdrive->bigbuff = global.nsectors * CD_FRAMESIZE_RAW;
145 + if (cdda_open(tmpdrive) != 0)
147 + fputs("Can't open disc\n", stderr);
148 + cdda_close(tmpdrive);
149 + return 1;
151 + global.cdp = paranoia_init(tmpdrive);
153 if (global.paranoia_parms.overlap >= 0) {
154 int overlap = global.paranoia_parms.overlap;
155 @@ -2902,17 +2923,7 @@ Rate Divider Rate Divider
156 overlap = global.nsectors - 1;
157 paranoia_overlapset(global.cdp, overlap);
159 - /*
160 - * Default to a minimum of dynamic overlapping == 0.5 sectors.
161 - * If we don't do this, we get the default from libparanoia
162 - * which is approx. 0.1.
163 - */
164 - if (global.paranoia_parms.mindynoverlap < 0)
165 - paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1);
166 - paranoia_dynoverlapset(global.cdp,
167 - global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS,
168 - global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS);
171 paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP;
173 if (global.paranoia_parms.disable_paranoia) {
174 diff -up cdrkit-1.1.11/icedax/icedax.h.paranoiacdda cdrkit-1.1.11/icedax/icedax.h
175 --- cdrkit-1.1.11/icedax/icedax.h.paranoiacdda 2012-07-31 14:27:15.216157005 +0200
176 +++ cdrkit-1.1.11/icedax/icedax.h 2012-07-31 14:27:15.217157039 +0200
177 @@ -41,7 +41,7 @@
179 /* Endianess */
180 #define GUESS (-2)
181 -#define NONE (-1)
182 +#define NONE_EN (-1)
183 #define LITTLE 0
184 #define BIG 1
186 diff -up cdrkit-1.1.11/icedax/interface.c.paranoiacdda cdrkit-1.1.11/icedax/interface.c
187 --- cdrkit-1.1.11/icedax/interface.c.paranoiacdda 2012-07-31 14:27:15.235157650 +0200
188 +++ cdrkit-1.1.11/icedax/interface.c 2012-07-31 14:27:15.232157548 +0200
189 @@ -116,7 +116,7 @@ int (*Play_at)(SCSI *usalp, unsigned in
190 int (*StopPlay)(SCSI *usalp);
191 void (*trash_cache)(UINT4 *p, unsigned lSector, unsigned SectorBurstVal);
193 -#if defined USE_PARANOIA
194 +#if 0 //defined USE_PARANOIA
195 long cdda_read(void *d, void *buffer, long beginsector, long sectors);
197 long cdda_read(void *d, void *buffer, long beginsector, long sectors)
198 diff -up cdrkit-1.1.11/icedax/toc.c.paranoiacdda cdrkit-1.1.11/icedax/toc.c
199 --- cdrkit-1.1.11/icedax/toc.c.paranoiacdda 2012-07-31 14:27:15.225157311 +0200
200 +++ cdrkit-1.1.11/icedax/toc.c 2012-07-31 14:27:15.230157480 +0200
201 @@ -379,8 +379,7 @@ static void emit_cddb_form(char *fname_b
202 static void emit_cdindex_form(char *fname_baseval);
203 #endif
206 -typedef struct TOC { /* structure of table of contents (cdrom) */
207 +typedef struct TOC_t { /* structure of table of contents (cdrom) */
208 unsigned char reserved1;
209 unsigned char bFlags;
210 unsigned char bTrack;
211 @@ -391,8 +390,7 @@ typedef struct TOC { /* structure of tab
212 int frms;
213 unsigned char ISRC[16];
214 int SCMS;
215 -} TOC;
217 +} TOC_t;
219 /* Flags contains two fields:
220 bits 7-4 (ADR)
221 @@ -432,7 +430,7 @@ struct iterator {
222 int index;
223 int startindex;
224 void (*reset)(struct iterator *this);
225 - struct TOC *(*getNextTrack)(struct iterator *this);
226 + struct TOC_t *(*getNextTrack)(struct iterator *this);
227 int (*hasNextTrack)(struct iterator *this);
230 @@ -518,7 +516,7 @@ unsigned FixupTOC(unsigned no_tracks)
231 InitIterator(&i, 1);
233 while (i.hasNextTrack(&i)) {
234 - struct TOC *p = i.getNextTrack(&i);
235 + struct TOC_t *p = i.getNextTrack(&i);
236 if (IS__AUDIO(p)) count_audio_tracks++;
239 @@ -733,7 +731,7 @@ static void emit_cddb_form(char *fname_b
240 fprintf( cddb_form, "# Track frame offsets:\n#\n");
242 while (i.hasNextTrack(&i)) {
243 - struct TOC *p = i.getNextTrack(&i);
244 + struct TOC_t *p = i.getNextTrack(&i);
245 if (GETTRACK(p) == CDROM_LEADOUT) break;
246 fprintf( cddb_form,
247 "# %lu\n", 150 + Get_AudioStartSector(GETTRACK(p)));
248 @@ -765,7 +763,7 @@ static void emit_cddb_form(char *fname_b
250 i.reset(&i);
251 while (i.hasNextTrack(&i)) {
252 - struct TOC *p = i.getNextTrack(&i);
253 + struct TOC_t *p = i.getNextTrack(&i);
254 int ii;
256 ii = GETTRACK(p);
257 @@ -788,7 +786,7 @@ static void emit_cddb_form(char *fname_b
259 i.reset(&i);
260 while (i.hasNextTrack(&i)) {
261 - struct TOC *p = i.getNextTrack(&i);
262 + struct TOC_t *p = i.getNextTrack(&i);
263 int ii;
265 ii = GETTRACK(p);
266 @@ -1495,7 +1493,7 @@ static int IsSingleArtist(void)
267 InitIterator(&i, 1);
269 while (i.hasNextTrack(&i)) {
270 - struct TOC *p = i.getNextTrack(&i);
271 + struct TOC_t *p = i.getNextTrack(&i);
272 int ii;
274 if (IS__DATA(p) || GETTRACK(p) == CDROM_LEADOUT) continue;
275 @@ -1681,7 +1679,7 @@ static void emit_cdindex_form(char *fnam
276 global.creator ? ascii2html(global.creator) : "");
278 while (i.hasNextTrack(&i)) {
279 - struct TOC *p = i.getNextTrack(&i);
280 + struct TOC_t *p = i.getNextTrack(&i);
281 int ii = GETTRACK(p);
283 if (ii == CDROM_LEADOUT) break;
284 @@ -1703,7 +1701,7 @@ static void emit_cdindex_form(char *fnam
285 fprintf( cdindex_form, " <MultipleArtistCD>\n");
287 while (i.hasNextTrack(&i)) {
288 - struct TOC *p = i.getNextTrack(&i);
289 + struct TOC_t *p = i.getNextTrack(&i);
290 int ii = GETTRACK(p);
292 if (ii == CDROM_LEADOUT) break;
293 @@ -1942,9 +1940,9 @@ static void DisplayToc_with_gui(unsigned
295 if ((global.verbose & (SHOW_TOC | SHOW_STARTPOSITIONS | SHOW_SUMMARY | SHOW_TITLES)) != 0
296 && i.hasNextTrack(&i)) {
297 - TOC *o = i.getNextTrack(&i);
298 + TOC_t *o = i.getNextTrack(&i);
299 while (i.hasNextTrack(&i)) {
300 - TOC *p = i.getNextTrack(&i);
301 + TOC_t *p = i.getNextTrack(&i);
302 int from;
303 from = GETTRACK(o);
305 @@ -2072,9 +2070,9 @@ static void DisplayToc_no_gui(unsigned l
306 count_audio_trks = 0;
308 if (i.hasNextTrack(&i)) {
309 - TOC *o = i.getNextTrack(&i);
310 + TOC_t *o = i.getNextTrack(&i);
311 while (i.hasNextTrack(&i)) {
312 - TOC *p = i.getNextTrack(&i);
313 + TOC_t *p = i.getNextTrack(&i);
314 int from;
315 from = GETTRACK(o);
317 @@ -2131,10 +2129,10 @@ static void DisplayToc_no_gui(unsigned l
318 i.reset(&i);
319 if ((global.verbose & SHOW_TOC) != 0 &&
320 i.hasNextTrack(&i)) {
321 - TOC *o = i.getNextTrack(&i);
322 + TOC_t *o = i.getNextTrack(&i);
324 for (; i.hasNextTrack(&i);) {
325 - TOC *p = i.getNextTrack(&i);
326 + TOC_t *p = i.getNextTrack(&i);
328 if ( GETTRACK(o) <= MAXTRK ) {
329 unsigned char brace1, brace2;
330 @@ -2189,9 +2187,9 @@ static void DisplayToc_no_gui(unsigned l
331 ii = 0;
332 i.reset(&i);
333 if (i.hasNextTrack(&i)) {
334 - TOC *o = i.getNextTrack(&i);
335 + TOC_t *o = i.getNextTrack(&i);
336 for ( ; i.hasNextTrack(&i);) {
337 - TOC *p = i.getNextTrack(&i);
338 + TOC_t *p = i.getNextTrack(&i);
339 fprintf ( stderr,
340 " %2u.(%8u)",
341 GETTRACK(o),
342 @@ -2248,7 +2246,7 @@ static void DisplayToc_no_gui(unsigned l
344 i.reset(&i);
345 for ( ; i.hasNextTrack(&i);) {
346 - TOC *p = i.getNextTrack(&i);
347 + TOC_t *p = i.getNextTrack(&i);
348 int jj = GETTRACK(p);
350 if ( global.tracktitle[jj] != NULL ) {
351 @@ -2260,7 +2258,7 @@ static void DisplayToc_no_gui(unsigned l
353 i.reset(&i);
354 for ( ; i.hasNextTrack(&i); ) {
355 - TOC *p = i.getNextTrack(&i);
356 + TOC_t *p = i.getNextTrack(&i);
357 int jj;
359 if (IS__DATA(p))
360 @@ -2720,7 +2718,7 @@ void Read_MCN_ISRC(void)
361 InitIterator(&i, 1);
363 while (i.hasNextTrack(&i)) {
364 - struct TOC *p = i.getNextTrack(&i);
365 + struct TOC_t *p = i.getNextTrack(&i);
366 unsigned ii = GETTRACK(p);
368 if (ii == CDROM_LEADOUT) break;
369 @@ -3155,7 +3153,7 @@ unsigned ScanIndices(unsigned track, uns
372 while (i.hasNextTrack(&i)) {
373 - struct TOC *p = i.getNextTrack(&i);
374 + struct TOC_t *p = i.getNextTrack(&i);
375 unsigned ii = GETTRACK(p);
377 if ( ii < starttrack || IS__DATA(p) )
378 @@ -3322,7 +3320,7 @@ unsigned char *Get_MCN(void)
382 -static TOC g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
383 +static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
385 /*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/
387 @@ -3397,10 +3395,10 @@ static int patch_cd_extra(unsigned track
389 static int restrict_tracks_illleadout(void)
391 - struct TOC *o = &g_toc[cdtracks+1];
392 + struct TOC_t *o = &g_toc[cdtracks+1];
393 int i;
394 for (i = cdtracks; i >= 0; i--) {
395 - struct TOC *p = &g_toc[i];
396 + struct TOC_t *p = &g_toc[i];
397 if (GETSTART(o) > GETSTART(p)) break;
399 patch_cd_extra(i+1, GETSTART(o));
400 @@ -3523,7 +3521,7 @@ static void it_reset(struct iterator *th
403 static int it_hasNextTrack(struct iterator *this);
404 -static struct TOC *it_getNextTrack(struct iterator *this);
405 +static struct TOC_t *it_getNextTrack(struct iterator *this);
407 static int it_hasNextTrack(struct iterator *this)
409 @@ -3532,7 +3530,7 @@ static int it_hasNextTrack(struct iterat
413 -static struct TOC *it_getNextTrack(struct iterator *this)
414 +static struct TOC_t *it_getNextTrack(struct iterator *this)
416 /* if ( (*this->hasNextTrack)(this) == 0 ) return NULL; */
417 if ( this->index > (int)cdtracks+1 ) return NULL;
418 @@ -3583,7 +3581,7 @@ long Get_AudioStartSector(unsigned long
419 if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
421 while (i.hasNextTrack(&i)) {
422 - TOC *p = i.getNextTrack(&i);
423 + TOC_t *p = i.getNextTrack(&i);
425 if (GETTRACK(p) == p_track) {
426 if (IS__DATA(p)) {
427 @@ -3613,7 +3611,7 @@ long Get_StartSector(unsigned long p_tra
428 if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
430 while (i.hasNextTrack(&i)) {
431 - TOC *p = i.getNextTrack(&i);
432 + TOC_t *p = i.getNextTrack(&i);
434 if (GETTRACK(p) == p_track) {
435 return GETSTART(p);
436 @@ -3637,7 +3635,7 @@ long Get_EndSector(unsigned long p_track
437 if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
439 while (i.hasNextTrack(&i)) {
440 - TOC *p = i.getNextTrack(&i);
441 + TOC_t *p = i.getNextTrack(&i);
442 if (GETTRACK(p) == p_track) {
443 p = i.getNextTrack(&i);
444 if (p == NULL) {
445 @@ -3669,7 +3667,7 @@ long FirstAudioTrack(void)
446 else i.reset(&i);
448 while (i.hasNextTrack(&i)) {
449 - TOC *p = i.getNextTrack(&i);
450 + TOC_t *p = i.getNextTrack(&i);
451 unsigned ii = GETTRACK(p);
453 if (ii == CDROM_LEADOUT) break;
454 @@ -3687,7 +3685,7 @@ long FirstDataTrack(void)
455 else i.reset(&i);
457 while (i.hasNextTrack(&i)) {
458 - TOC *p = i.getNextTrack(&i);
459 + TOC_t *p = i.getNextTrack(&i);
460 if (IS__DATA(p)) {
461 return GETTRACK(p);
463 @@ -3708,7 +3706,7 @@ long LastAudioTrack(void)
464 else i.reset(&i);
466 while (i.hasNextTrack(&i)) {
467 - TOC *p = i.getNextTrack(&i);
468 + TOC_t *p = i.getNextTrack(&i);
469 if (IS__AUDIO(p) && (GETTRACK(p) != CDROM_LEADOUT)) {
470 j = GETTRACK(p);
472 @@ -3730,7 +3728,7 @@ long Get_LastSectorOnCd(unsigned long p_
473 if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
475 while (i.hasNextTrack(&i)) {
476 - TOC *p = i.getNextTrack(&i);
477 + TOC_t *p = i.getNextTrack(&i);
479 if (GETTRACK(p) < p_track)
480 continue;
481 @@ -3749,9 +3747,9 @@ int Get_Track(unsigned long sector)
482 else i.reset(&i);
484 if (i.hasNextTrack(&i)) {
485 - TOC *o = i.getNextTrack(&i);
486 + TOC_t *o = i.getNextTrack(&i);
487 while (i.hasNextTrack(&i)) {
488 - TOC *p = i.getNextTrack(&i);
489 + TOC_t *p = i.getNextTrack(&i);
490 if ((GETSTART(o) <= sector) && (GETSTART(p) > sector)) {
491 if (IS__DATA(o)) {
492 return -1;
493 @@ -3772,7 +3770,7 @@ int CheckTrackrange(unsigned long from,
494 else i.reset(&i);
496 while (i.hasNextTrack(&i)) {
497 - TOC *p = i.getNextTrack(&i);
498 + TOC_t *p = i.getNextTrack(&i);
500 if (GETTRACK(p) < from)
501 continue;
502 @@ -3788,54 +3786,3 @@ int CheckTrackrange(unsigned long from,
503 return 0;
506 -#ifdef USE_PARANOIA
507 -long cdda_disc_firstsector(void *d);
509 -long cdda_disc_firstsector(void *d)
511 - return Get_StartSector(FirstAudioTrack());
514 -int cdda_tracks(void *d);
516 -int cdda_tracks(void *d)
518 - return LastAudioTrack() - FirstAudioTrack() +1;
521 -int cdda_track_audiop(void *d, int track);
523 -int cdda_track_audiop(void *d, int track)
525 - return Get_Datatrack(track) == 0;
528 -long cdda_track_firstsector(void *d, int track);
530 -long cdda_track_firstsector(void *d, int track)
532 - return Get_AudioStartSector(track);
535 -long cdda_track_lastsector(void *d, int track);
537 -long cdda_track_lastsector(void *d, int track)
539 - return Get_EndSector(track);
542 -long cdda_disc_lastsector(void *d);
544 -long cdda_disc_lastsector(void *d)
546 - return Get_LastSectorOnCd(cdtracks) - 1;
549 -int cdda_sector_gettrack(void *d,long sector);
551 -int cdda_sector_gettrack(void *d, long sector)
553 - return Get_Track(sector);
556 -#endif