cdrkit-1.1.11-paranoiacdda.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. diff -Nuar cdrkit-1.1.11.orig/CMakeLists.txt cdrkit-1.1.11/CMakeLists.txt
  2. --- cdrkit-1.1.11.orig/CMakeLists.txt 2017-03-29 12:59:41.047130027 +0300
  3. +++ cdrkit-1.1.11/CMakeLists.txt 2017-03-29 13:00:50.198131670 +0300
  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)
  8. diff -Nuar cdrkit-1.1.11.orig/icedax/CMakeLists.txt cdrkit-1.1.11/icedax/CMakeLists.txt
  9. --- cdrkit-1.1.11.orig/icedax/CMakeLists.txt 2017-03-29 12:59:41.036130027 +0300
  10. +++ cdrkit-1.1.11/icedax/CMakeLists.txt 2017-03-29 13:02:45.030134400 +0300
  11. @@ -1,8 +1,9 @@
  12. PROJECT (icedax C)
  13. -INCLUDE_DIRECTORIES(../include ../wodim ../libparanoia ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
  14. +INCLUDE_DIRECTORIES(../include ../wodim ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
  15. include(../include/AddScgBits.cmake)
  16. include(../include/AddSchilyBits.cmake)
  17. include(../include/AddNetworkBits.cmake)
  18. +INCLUDE (CheckLibraryExists)
  19. FIND_FILE (HAVE_SYS_SOUNDCARD_H sys/soundcard.h)
  20. IF(HAVE_SYS_SOUNDCARD_H)
  21. @@ -18,12 +19,20 @@
  22. LIST(APPEND EXTRA_LIBS "ossaudio")
  23. ENDIF(HAVE_LIBOSSAUDIO)
  24. -LIST(APPEND EXTRA_LIBS paranoia)
  25. +CHECK_INCLUDE_FILES(cdda_interface.h HAVE_CDDA_INTERFACE_H)
  26. +CHECK_LIBRARY_EXISTS (cdda_paranoia paranoia_init "" HAVE_LIBPARANOIA)
  27. +IF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
  28. + LIST(APPEND EXTRA_LIBS cdda_paranoia cdda_interface)
  29. +ELSE(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
  30. + MESSAGE(FATAL_ERROR "You need cdparanoia library installed")
  31. +ENDIF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
  32. +
  33. +LIST(APPEND EXTRA_LIBS)
  34. IF (WIN32)
  35. LIST(APPEND EXTRA_LIBS winmm)
  36. ENDIF (WIN32)
  37. -LINK_DIRECTORIES(../librols ../libusal ../libparanoia)
  38. +LINK_DIRECTORIES(../librols ../libusal)
  39. 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)
  40. TARGET_LINK_LIBRARIES(icedax wodimstuff ${EXTRA_LIBS})
  41. SET_TARGET_PROPERTIES(icedax PROPERTIES SKIP_BUILD_RPATH TRUE)
  42. diff -Nuar cdrkit-1.1.11.orig/icedax/global.h cdrkit-1.1.11/icedax/global.h
  43. --- cdrkit-1.1.11.orig/icedax/global.h 2017-03-29 12:59:41.036130027 +0300
  44. +++ cdrkit-1.1.11/icedax/global.h 2017-03-29 13:04:00.792136200 +0300
  45. @@ -17,7 +17,8 @@
  46. #include "md5.h"
  47. #endif
  48. #ifdef USE_PARANOIA
  49. -#include "cdda_paranoia.h"
  50. +#include <cdda_interface.h>
  51. +#include <cdda_paranoia.h>
  52. #endif
  53. typedef struct index_list
  54. @@ -102,10 +103,10 @@
  55. struct paranoia_parms_t
  56. {
  57. - Ucbit disable_paranoia:1;
  58. - Ucbit disable_extra_paranoia:1;
  59. - Ucbit disable_scratch_detect:1;
  60. - Ucbit disable_scratch_repair:1;
  61. + char disable_paranoia:1;
  62. + char disable_extra_paranoia:1;
  63. + char disable_scratch_detect:1;
  64. + char disable_scratch_repair:1;
  65. int retries;
  66. int overlap;
  67. int mindynoverlap;
  68. diff -Nuar cdrkit-1.1.11.orig/icedax/icedax.c cdrkit-1.1.11/icedax/icedax.c
  69. --- cdrkit-1.1.11.orig/icedax/icedax.c 2017-03-29 12:59:41.036130027 +0300
  70. +++ cdrkit-1.1.11/icedax/icedax.c 2017-03-29 13:03:35.216135592 +0300
  71. @@ -120,6 +120,10 @@
  72. #ifdef USE_LAME
  73. #include "mp3.h" /* mp3 file handling */
  74. #endif
  75. +#ifdef USE_PARANOIA
  76. +#include <cdda_interface.h>
  77. +#include <cdda_paranoia.h>
  78. +#endif
  79. #include "interface.h" /* low level cdrom interfacing */
  80. #include "icedax.h"
  81. #include "resample.h"
  82. @@ -128,9 +132,6 @@
  83. #include "ringbuff.h"
  84. #include "global.h"
  85. #include "exitcodes.h"
  86. -#ifdef USE_PARANOIA
  87. -#include "cdda_paranoia.h"
  88. -#endif
  89. #include "defaults.h"
  90. static void RestrictPlaybackRate(long newrate);
  91. @@ -800,7 +801,7 @@
  92. global.useroverlap = -1; /* amount of overlapping sectors user override */
  93. global.need_hostorder = 0; /* processing needs samples in host endianess */
  94. global.in_lendian = -1; /* input endianess from SetupSCSI() */
  95. - global.outputendianess = NONE; /* user specified output endianess */
  96. + global.outputendianess = NONE_EN; /* user specified output endianess */
  97. global.findminmax = 0; /* flag find extrem amplitudes */
  98. #ifdef HAVE_LIMITS_H
  99. global.maxamp[0] = INT_MIN; /* maximum amplitude */
  100. @@ -2418,7 +2419,7 @@
  101. if (bulk == -1) bulk = 0;
  102. global.need_big_endian = global.audio_out->need_big_endian;
  103. - if (global.outputendianess != NONE)
  104. + if (global.outputendianess != NONE_EN)
  105. global.need_big_endian = global.outputendianess == BIG;
  106. if (global.no_file) global.fname_base[0] = '\0';
  107. @@ -2602,7 +2603,7 @@
  108. fputs( ", soundcard", stderr );
  109. #endif
  110. #if defined USE_PARANOIA
  111. - fputs( ", libparanoia", stderr );
  112. + fputs( ", libcdda_paranoia", stderr );
  113. #endif
  114. fputs( " support\n", stderr );
  115. }
  116. @@ -2892,8 +2893,28 @@
  117. #ifdef USE_PARANOIA
  118. if (global.paranoia_selected) {
  119. long paranoia_mode;
  120. + cdrom_drive *tmpdrive;
  121. + usal_close(get_scsi_p());
  122. - global.cdp = paranoia_init(get_scsi_p(), global.nsectors);
  123. + tmpdrive = cdda_identify(global.dev_name, 0, NULL);
  124. + if (!tmpdrive)
  125. + {
  126. + fputs("Can't identify disc\n", stderr);
  127. + return 1;
  128. + }
  129. +
  130. + if(global.nsectors)
  131. + {
  132. + tmpdrive->nsectors = global.nsectors;
  133. + tmpdrive->bigbuff = global.nsectors * CD_FRAMESIZE_RAW;
  134. + }
  135. + if (cdda_open(tmpdrive) != 0)
  136. + {
  137. + fputs("Can't open disc\n", stderr);
  138. + cdda_close(tmpdrive);
  139. + return 1;
  140. + }
  141. + global.cdp = paranoia_init(tmpdrive);
  142. if (global.paranoia_parms.overlap >= 0) {
  143. int overlap = global.paranoia_parms.overlap;
  144. @@ -2902,17 +2923,7 @@
  145. overlap = global.nsectors - 1;
  146. paranoia_overlapset(global.cdp, overlap);
  147. }
  148. - /*
  149. - * Default to a minimum of dynamic overlapping == 0.5 sectors.
  150. - * If we don't do this, we get the default from libparanoia
  151. - * which is approx. 0.1.
  152. - */
  153. - if (global.paranoia_parms.mindynoverlap < 0)
  154. - paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1);
  155. - paranoia_dynoverlapset(global.cdp,
  156. - global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS,
  157. - global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS);
  158. -
  159. +
  160. paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP;
  161. if (global.paranoia_parms.disable_paranoia) {
  162. diff -Nuar cdrkit-1.1.11.orig/icedax/icedax.h cdrkit-1.1.11/icedax/icedax.h
  163. --- cdrkit-1.1.11.orig/icedax/icedax.h 2017-03-29 12:59:41.036130027 +0300
  164. +++ cdrkit-1.1.11/icedax/icedax.h 2017-03-29 13:00:50.199131670 +0300
  165. @@ -41,7 +41,7 @@
  166. /* Endianess */
  167. #define GUESS (-2)
  168. -#define NONE (-1)
  169. +#define NONE_EN (-1)
  170. #define LITTLE 0
  171. #define BIG 1
  172. diff -Nuar cdrkit-1.1.11.orig/icedax/interface.c cdrkit-1.1.11/icedax/interface.c
  173. --- cdrkit-1.1.11.orig/icedax/interface.c 2017-03-29 12:59:41.035130027 +0300
  174. +++ cdrkit-1.1.11/icedax/interface.c 2017-03-29 13:00:50.199131670 +0300
  175. @@ -116,7 +116,7 @@
  176. int (*StopPlay)(SCSI *usalp);
  177. void (*trash_cache)(UINT4 *p, unsigned lSector, unsigned SectorBurstVal);
  178. -#if defined USE_PARANOIA
  179. +#if 0 //defined USE_PARANOIA
  180. long cdda_read(void *d, void *buffer, long beginsector, long sectors);
  181. long cdda_read(void *d, void *buffer, long beginsector, long sectors)
  182. diff -Nuar cdrkit-1.1.11.orig/icedax/toc.c cdrkit-1.1.11/icedax/toc.c
  183. --- cdrkit-1.1.11.orig/icedax/toc.c 2017-03-29 12:59:41.037130027 +0300
  184. +++ cdrkit-1.1.11/icedax/toc.c 2017-03-29 13:00:50.200131670 +0300
  185. @@ -379,8 +379,7 @@
  186. static void emit_cdindex_form(char *fname_baseval);
  187. #endif
  188. -
  189. -typedef struct TOC { /* structure of table of contents (cdrom) */
  190. +typedef struct TOC_t { /* structure of table of contents (cdrom) */
  191. unsigned char reserved1;
  192. unsigned char bFlags;
  193. unsigned char bTrack;
  194. @@ -391,8 +390,7 @@
  195. int frms;
  196. unsigned char ISRC[16];
  197. int SCMS;
  198. -} TOC;
  199. -
  200. +} TOC_t;
  201. /* Flags contains two fields:
  202. bits 7-4 (ADR)
  203. @@ -432,7 +430,7 @@
  204. int index;
  205. int startindex;
  206. void (*reset)(struct iterator *this);
  207. - struct TOC *(*getNextTrack)(struct iterator *this);
  208. + struct TOC_t *(*getNextTrack)(struct iterator *this);
  209. int (*hasNextTrack)(struct iterator *this);
  210. };
  211. @@ -518,7 +516,7 @@
  212. InitIterator(&i, 1);
  213. while (i.hasNextTrack(&i)) {
  214. - struct TOC *p = i.getNextTrack(&i);
  215. + struct TOC_t *p = i.getNextTrack(&i);
  216. if (IS__AUDIO(p)) count_audio_tracks++;
  217. }
  218. @@ -733,7 +731,7 @@
  219. fprintf( cddb_form, "# Track frame offsets:\n#\n");
  220. while (i.hasNextTrack(&i)) {
  221. - struct TOC *p = i.getNextTrack(&i);
  222. + struct TOC_t *p = i.getNextTrack(&i);
  223. if (GETTRACK(p) == CDROM_LEADOUT) break;
  224. fprintf( cddb_form,
  225. "# %lu\n", 150 + Get_AudioStartSector(GETTRACK(p)));
  226. @@ -765,7 +763,7 @@
  227. i.reset(&i);
  228. while (i.hasNextTrack(&i)) {
  229. - struct TOC *p = i.getNextTrack(&i);
  230. + struct TOC_t *p = i.getNextTrack(&i);
  231. int ii;
  232. ii = GETTRACK(p);
  233. @@ -788,7 +786,7 @@
  234. i.reset(&i);
  235. while (i.hasNextTrack(&i)) {
  236. - struct TOC *p = i.getNextTrack(&i);
  237. + struct TOC_t *p = i.getNextTrack(&i);
  238. int ii;
  239. ii = GETTRACK(p);
  240. @@ -1495,7 +1493,7 @@
  241. InitIterator(&i, 1);
  242. while (i.hasNextTrack(&i)) {
  243. - struct TOC *p = i.getNextTrack(&i);
  244. + struct TOC_t *p = i.getNextTrack(&i);
  245. int ii;
  246. if (IS__DATA(p) || GETTRACK(p) == CDROM_LEADOUT) continue;
  247. @@ -1681,7 +1679,7 @@
  248. global.creator ? ascii2html(global.creator) : "");
  249. while (i.hasNextTrack(&i)) {
  250. - struct TOC *p = i.getNextTrack(&i);
  251. + struct TOC_t *p = i.getNextTrack(&i);
  252. int ii = GETTRACK(p);
  253. if (ii == CDROM_LEADOUT) break;
  254. @@ -1703,7 +1701,7 @@
  255. fprintf( cdindex_form, " <MultipleArtistCD>\n");
  256. while (i.hasNextTrack(&i)) {
  257. - struct TOC *p = i.getNextTrack(&i);
  258. + struct TOC_t *p = i.getNextTrack(&i);
  259. int ii = GETTRACK(p);
  260. if (ii == CDROM_LEADOUT) break;
  261. @@ -1942,9 +1940,9 @@
  262. if ((global.verbose & (SHOW_TOC | SHOW_STARTPOSITIONS | SHOW_SUMMARY | SHOW_TITLES)) != 0
  263. && i.hasNextTrack(&i)) {
  264. - TOC *o = i.getNextTrack(&i);
  265. + TOC_t *o = i.getNextTrack(&i);
  266. while (i.hasNextTrack(&i)) {
  267. - TOC *p = i.getNextTrack(&i);
  268. + TOC_t *p = i.getNextTrack(&i);
  269. int from;
  270. from = GETTRACK(o);
  271. @@ -2072,9 +2070,9 @@
  272. count_audio_trks = 0;
  273. if (i.hasNextTrack(&i)) {
  274. - TOC *o = i.getNextTrack(&i);
  275. + TOC_t *o = i.getNextTrack(&i);
  276. while (i.hasNextTrack(&i)) {
  277. - TOC *p = i.getNextTrack(&i);
  278. + TOC_t *p = i.getNextTrack(&i);
  279. int from;
  280. from = GETTRACK(o);
  281. @@ -2131,10 +2129,10 @@
  282. i.reset(&i);
  283. if ((global.verbose & SHOW_TOC) != 0 &&
  284. i.hasNextTrack(&i)) {
  285. - TOC *o = i.getNextTrack(&i);
  286. + TOC_t *o = i.getNextTrack(&i);
  287. for (; i.hasNextTrack(&i);) {
  288. - TOC *p = i.getNextTrack(&i);
  289. + TOC_t *p = i.getNextTrack(&i);
  290. if ( GETTRACK(o) <= MAXTRK ) {
  291. unsigned char brace1, brace2;
  292. @@ -2189,9 +2187,9 @@
  293. ii = 0;
  294. i.reset(&i);
  295. if (i.hasNextTrack(&i)) {
  296. - TOC *o = i.getNextTrack(&i);
  297. + TOC_t *o = i.getNextTrack(&i);
  298. for ( ; i.hasNextTrack(&i);) {
  299. - TOC *p = i.getNextTrack(&i);
  300. + TOC_t *p = i.getNextTrack(&i);
  301. fprintf ( stderr,
  302. " %2u.(%8u)",
  303. GETTRACK(o),
  304. @@ -2248,7 +2246,7 @@
  305. i.reset(&i);
  306. for ( ; i.hasNextTrack(&i);) {
  307. - TOC *p = i.getNextTrack(&i);
  308. + TOC_t *p = i.getNextTrack(&i);
  309. int jj = GETTRACK(p);
  310. if ( global.tracktitle[jj] != NULL ) {
  311. @@ -2260,7 +2258,7 @@
  312. i.reset(&i);
  313. for ( ; i.hasNextTrack(&i); ) {
  314. - TOC *p = i.getNextTrack(&i);
  315. + TOC_t *p = i.getNextTrack(&i);
  316. int jj;
  317. if (IS__DATA(p))
  318. @@ -2720,7 +2718,7 @@
  319. InitIterator(&i, 1);
  320. while (i.hasNextTrack(&i)) {
  321. - struct TOC *p = i.getNextTrack(&i);
  322. + struct TOC_t *p = i.getNextTrack(&i);
  323. unsigned ii = GETTRACK(p);
  324. if (ii == CDROM_LEADOUT) break;
  325. @@ -3155,7 +3153,7 @@
  326. while (i.hasNextTrack(&i)) {
  327. - struct TOC *p = i.getNextTrack(&i);
  328. + struct TOC_t *p = i.getNextTrack(&i);
  329. unsigned ii = GETTRACK(p);
  330. if ( ii < starttrack || IS__DATA(p) )
  331. @@ -3322,7 +3320,7 @@
  332. }
  333. -static TOC g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
  334. +static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
  335. /*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/
  336. @@ -3397,10 +3395,10 @@
  337. static int restrict_tracks_illleadout(void)
  338. {
  339. - struct TOC *o = &g_toc[cdtracks+1];
  340. + struct TOC_t *o = &g_toc[cdtracks+1];
  341. int i;
  342. for (i = cdtracks; i >= 0; i--) {
  343. - struct TOC *p = &g_toc[i];
  344. + struct TOC_t *p = &g_toc[i];
  345. if (GETSTART(o) > GETSTART(p)) break;
  346. }
  347. patch_cd_extra(i+1, GETSTART(o));
  348. @@ -3523,7 +3521,7 @@
  349. static int it_hasNextTrack(struct iterator *this);
  350. -static struct TOC *it_getNextTrack(struct iterator *this);
  351. +static struct TOC_t *it_getNextTrack(struct iterator *this);
  352. static int it_hasNextTrack(struct iterator *this)
  353. {
  354. @@ -3532,7 +3530,7 @@
  355. -static struct TOC *it_getNextTrack(struct iterator *this)
  356. +static struct TOC_t *it_getNextTrack(struct iterator *this)
  357. {
  358. /* if ( (*this->hasNextTrack)(this) == 0 ) return NULL; */
  359. if ( this->index > (int)cdtracks+1 ) return NULL;
  360. @@ -3583,7 +3581,7 @@
  361. if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
  362. while (i.hasNextTrack(&i)) {
  363. - TOC *p = i.getNextTrack(&i);
  364. + TOC_t *p = i.getNextTrack(&i);
  365. if (GETTRACK(p) == p_track) {
  366. if (IS__DATA(p)) {
  367. @@ -3613,7 +3611,7 @@
  368. if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
  369. while (i.hasNextTrack(&i)) {
  370. - TOC *p = i.getNextTrack(&i);
  371. + TOC_t *p = i.getNextTrack(&i);
  372. if (GETTRACK(p) == p_track) {
  373. return GETSTART(p);
  374. @@ -3637,7 +3635,7 @@
  375. if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
  376. while (i.hasNextTrack(&i)) {
  377. - TOC *p = i.getNextTrack(&i);
  378. + TOC_t *p = i.getNextTrack(&i);
  379. if (GETTRACK(p) == p_track) {
  380. p = i.getNextTrack(&i);
  381. if (p == NULL) {
  382. @@ -3669,7 +3667,7 @@
  383. else i.reset(&i);
  384. while (i.hasNextTrack(&i)) {
  385. - TOC *p = i.getNextTrack(&i);
  386. + TOC_t *p = i.getNextTrack(&i);
  387. unsigned ii = GETTRACK(p);
  388. if (ii == CDROM_LEADOUT) break;
  389. @@ -3687,7 +3685,7 @@
  390. else i.reset(&i);
  391. while (i.hasNextTrack(&i)) {
  392. - TOC *p = i.getNextTrack(&i);
  393. + TOC_t *p = i.getNextTrack(&i);
  394. if (IS__DATA(p)) {
  395. return GETTRACK(p);
  396. }
  397. @@ -3708,7 +3706,7 @@
  398. else i.reset(&i);
  399. while (i.hasNextTrack(&i)) {
  400. - TOC *p = i.getNextTrack(&i);
  401. + TOC_t *p = i.getNextTrack(&i);
  402. if (IS__AUDIO(p) && (GETTRACK(p) != CDROM_LEADOUT)) {
  403. j = GETTRACK(p);
  404. }
  405. @@ -3730,7 +3728,7 @@
  406. if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
  407. while (i.hasNextTrack(&i)) {
  408. - TOC *p = i.getNextTrack(&i);
  409. + TOC_t *p = i.getNextTrack(&i);
  410. if (GETTRACK(p) < p_track)
  411. continue;
  412. @@ -3749,9 +3747,9 @@
  413. else i.reset(&i);
  414. if (i.hasNextTrack(&i)) {
  415. - TOC *o = i.getNextTrack(&i);
  416. + TOC_t *o = i.getNextTrack(&i);
  417. while (i.hasNextTrack(&i)) {
  418. - TOC *p = i.getNextTrack(&i);
  419. + TOC_t *p = i.getNextTrack(&i);
  420. if ((GETSTART(o) <= sector) && (GETSTART(p) > sector)) {
  421. if (IS__DATA(o)) {
  422. return -1;
  423. @@ -3772,7 +3770,7 @@
  424. else i.reset(&i);
  425. while (i.hasNextTrack(&i)) {
  426. - TOC *p = i.getNextTrack(&i);
  427. + TOC_t *p = i.getNextTrack(&i);
  428. if (GETTRACK(p) < from)
  429. continue;
  430. @@ -3788,54 +3786,3 @@
  431. return 0;
  432. }
  433. -#ifdef USE_PARANOIA
  434. -long cdda_disc_firstsector(void *d);
  435. -
  436. -long cdda_disc_firstsector(void *d)
  437. -{
  438. - return Get_StartSector(FirstAudioTrack());
  439. -}
  440. -
  441. -int cdda_tracks(void *d);
  442. -
  443. -int cdda_tracks(void *d)
  444. -{
  445. - return LastAudioTrack() - FirstAudioTrack() +1;
  446. -}
  447. -
  448. -int cdda_track_audiop(void *d, int track);
  449. -
  450. -int cdda_track_audiop(void *d, int track)
  451. -{
  452. - return Get_Datatrack(track) == 0;
  453. -}
  454. -
  455. -long cdda_track_firstsector(void *d, int track);
  456. -
  457. -long cdda_track_firstsector(void *d, int track)
  458. -{
  459. - return Get_AudioStartSector(track);
  460. -}
  461. -
  462. -long cdda_track_lastsector(void *d, int track);
  463. -
  464. -long cdda_track_lastsector(void *d, int track)
  465. -{
  466. - return Get_EndSector(track);
  467. -}
  468. -
  469. -long cdda_disc_lastsector(void *d);
  470. -
  471. -long cdda_disc_lastsector(void *d)
  472. -{
  473. - return Get_LastSectorOnCd(cdtracks) - 1;
  474. -}
  475. -
  476. -int cdda_sector_gettrack(void *d,long sector);
  477. -
  478. -int cdda_sector_gettrack(void *d, long sector)
  479. -{
  480. - return Get_Track(sector);
  481. -}
  482. -
  483. -#endif