|
|
8c1a2e |
diff -up cdrkit-1.1.11/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/CMakeLists.txt
|
|
|
8c1a2e |
--- cdrkit-1.1.11/CMakeLists.txt.paranoiacdda 2012-07-31 14:27:15.166155309 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/CMakeLists.txt 2012-07-31 14:27:28.469613175 +0200
|
|
|
8c1a2e |
@@ -1,3 +1,3 @@
|
|
|
8c1a2e |
PROJECT (cdrkit C)
|
|
|
8c1a2e |
-SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
|
|
|
8c1a2e |
+SUBDIRS(include genisoimage wodim libedc libhfs_iso icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
|
|
|
8c1a2e |
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda cdrkit-1.1.11/icedax/CMakeLists.txt
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/CMakeLists.txt.paranoiacdda 2012-07-31 14:27:15.228157411 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/CMakeLists.txt 2012-07-31 14:27:15.239157786 +0200
|
|
|
8c1a2e |
@@ -1,8 +1,9 @@
|
|
|
8c1a2e |
PROJECT (icedax C)
|
|
|
8c1a2e |
-INCLUDE_DIRECTORIES(../include ../wodim ../libparanoia ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
|
|
|
8c1a2e |
+INCLUDE_DIRECTORIES(../include ../wodim ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include)
|
|
|
8c1a2e |
include(../include/AddScgBits.cmake)
|
|
|
8c1a2e |
include(../include/AddSchilyBits.cmake)
|
|
|
8c1a2e |
include(../include/AddNetworkBits.cmake)
|
|
|
8c1a2e |
+INCLUDE (CheckLibraryExists)
|
|
|
8c1a2e |
|
|
|
8c1a2e |
FIND_FILE (HAVE_SYS_SOUNDCARD_H sys/soundcard.h)
|
|
|
8c1a2e |
IF(HAVE_SYS_SOUNDCARD_H)
|
|
|
8c1a2e |
@@ -18,12 +19,20 @@ IF(HAVE_LIBOSSAUDIO)
|
|
|
8c1a2e |
LIST(APPEND EXTRA_LIBS "ossaudio")
|
|
|
8c1a2e |
ENDIF(HAVE_LIBOSSAUDIO)
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-LIST(APPEND EXTRA_LIBS paranoia)
|
|
|
8c1a2e |
+CHECK_INCLUDE_FILES(cdda/cdda_interface.h HAVE_CDDA_INTERFACE_H)
|
|
|
8c1a2e |
+CHECK_LIBRARY_EXISTS (cdda_paranoia paranoia_init "" HAVE_LIBPARANOIA)
|
|
|
8c1a2e |
+IF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
|
|
|
8c1a2e |
+ LIST(APPEND EXTRA_LIBS cdda_paranoia cdda_interface)
|
|
|
8c1a2e |
+ELSE(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
|
|
|
8c1a2e |
+ MESSAGE(FATAL_ERROR "You need cdparanoia library installed")
|
|
|
8c1a2e |
+ENDIF(HAVE_CDDA_INTERFACE_H AND HAVE_LIBPARANOIA)
|
|
|
8c1a2e |
+
|
|
|
8c1a2e |
+LIST(APPEND EXTRA_LIBS)
|
|
|
8c1a2e |
IF (WIN32)
|
|
|
8c1a2e |
LIST(APPEND EXTRA_LIBS winmm)
|
|
|
8c1a2e |
ENDIF (WIN32)
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-LINK_DIRECTORIES(../librols ../libusal ../libparanoia)
|
|
|
8c1a2e |
+LINK_DIRECTORIES(../librols ../libusal)
|
|
|
8c1a2e |
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)
|
|
|
8c1a2e |
TARGET_LINK_LIBRARIES(icedax wodimstuff ${EXTRA_LIBS})
|
|
|
8c1a2e |
SET_TARGET_PROPERTIES(icedax PROPERTIES SKIP_BUILD_RPATH TRUE)
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/global.h.paranoiacdda cdrkit-1.1.11/icedax/global.h
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/global.h.paranoiacdda 2012-07-31 14:27:15.232157548 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/global.h 2012-07-31 14:27:15.226157345 +0200
|
|
|
8c1a2e |
@@ -17,7 +17,8 @@
|
|
|
8c1a2e |
#include "md5.h"
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
#ifdef USE_PARANOIA
|
|
|
8c1a2e |
-#include "cdda_paranoia.h"
|
|
|
8c1a2e |
+#include <cdda/cdda_interface.h>
|
|
|
8c1a2e |
+#include <cdda/cdda_paranoia.h>
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
|
|
|
8c1a2e |
typedef struct index_list
|
|
|
8c1a2e |
@@ -102,10 +103,10 @@ typedef struct global
|
|
|
8c1a2e |
|
|
|
8c1a2e |
struct paranoia_parms_t
|
|
|
8c1a2e |
{
|
|
|
8c1a2e |
- Ucbit disable_paranoia:1;
|
|
|
8c1a2e |
- Ucbit disable_extra_paranoia:1;
|
|
|
8c1a2e |
- Ucbit disable_scratch_detect:1;
|
|
|
8c1a2e |
- Ucbit disable_scratch_repair:1;
|
|
|
8c1a2e |
+ char disable_paranoia:1;
|
|
|
8c1a2e |
+ char disable_extra_paranoia:1;
|
|
|
8c1a2e |
+ char disable_scratch_detect:1;
|
|
|
8c1a2e |
+ char disable_scratch_repair:1;
|
|
|
8c1a2e |
int retries;
|
|
|
8c1a2e |
int overlap;
|
|
|
8c1a2e |
int mindynoverlap;
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/icedax.c.paranoiacdda cdrkit-1.1.11/icedax/icedax.c
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/icedax.c.paranoiacdda 2012-07-31 14:27:15.237157718 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/icedax.c 2012-07-31 14:27:15.238157752 +0200
|
|
|
8c1a2e |
@@ -120,6 +120,10 @@
|
|
|
8c1a2e |
#ifdef USE_LAME
|
|
|
8c1a2e |
#include "mp3.h" /* mp3 file handling */
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
+#ifdef USE_PARANOIA
|
|
|
8c1a2e |
+#include <cdda/cdda_interface.h>
|
|
|
8c1a2e |
+#include <cdda/cdda_paranoia.h>
|
|
|
8c1a2e |
+#endif
|
|
|
8c1a2e |
#include "interface.h" /* low level cdrom interfacing */
|
|
|
8c1a2e |
#include "icedax.h"
|
|
|
8c1a2e |
#include "resample.h"
|
|
|
8c1a2e |
@@ -128,9 +132,6 @@
|
|
|
8c1a2e |
#include "ringbuff.h"
|
|
|
8c1a2e |
#include "global.h"
|
|
|
8c1a2e |
#include "exitcodes.h"
|
|
|
8c1a2e |
-#ifdef USE_PARANOIA
|
|
|
8c1a2e |
-#include "cdda_paranoia.h"
|
|
|
8c1a2e |
-#endif
|
|
|
8c1a2e |
#include "defaults.h"
|
|
|
8c1a2e |
|
|
|
8c1a2e |
static void RestrictPlaybackRate(long newrate);
|
|
|
8c1a2e |
@@ -800,7 +801,7 @@ static void init_globals()
|
|
|
8c1a2e |
global.useroverlap = -1; /* amount of overlapping sectors user override */
|
|
|
8c1a2e |
global.need_hostorder = 0; /* processing needs samples in host endianess */
|
|
|
8c1a2e |
global.in_lendian = -1; /* input endianess from SetupSCSI() */
|
|
|
8c1a2e |
- global.outputendianess = NONE; /* user specified output endianess */
|
|
|
8c1a2e |
+ global.outputendianess = NONE_EN; /* user specified output endianess */
|
|
|
8c1a2e |
global.findminmax = 0; /* flag find extrem amplitudes */
|
|
|
8c1a2e |
#ifdef HAVE_LIMITS_H
|
|
|
8c1a2e |
global.maxamp[0] = INT_MIN; /* maximum amplitude */
|
|
|
8c1a2e |
@@ -2418,7 +2419,7 @@ Rate Divider Rate Divider
|
|
|
8c1a2e |
if (bulk == -1) bulk = 0;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
global.need_big_endian = global.audio_out->need_big_endian;
|
|
|
8c1a2e |
- if (global.outputendianess != NONE)
|
|
|
8c1a2e |
+ if (global.outputendianess != NONE_EN)
|
|
|
8c1a2e |
global.need_big_endian = global.outputendianess == BIG;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (global.no_file) global.fname_base[0] = '\0';
|
|
|
8c1a2e |
@@ -2602,7 +2603,7 @@ Rate Divider Rate Divider
|
|
|
8c1a2e |
fputs( ", soundcard", stderr );
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
#if defined USE_PARANOIA
|
|
|
8c1a2e |
- fputs( ", libparanoia", stderr );
|
|
|
8c1a2e |
+ fputs( ", libcdda_paranoia", stderr );
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
fputs( " support\n", stderr );
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
@@ -2892,8 +2893,28 @@ Rate Divider Rate Divider
|
|
|
8c1a2e |
#ifdef USE_PARANOIA
|
|
|
8c1a2e |
if (global.paranoia_selected) {
|
|
|
8c1a2e |
long paranoia_mode;
|
|
|
8c1a2e |
+ cdrom_drive *tmpdrive;
|
|
|
8c1a2e |
+ usal_close(get_scsi_p());
|
|
|
8c1a2e |
|
|
|
8c1a2e |
- global.cdp = paranoia_init(get_scsi_p(), global.nsectors);
|
|
|
8c1a2e |
+ tmpdrive = cdda_identify(global.dev_name, 0, NULL);
|
|
|
8c1a2e |
+ if (!tmpdrive)
|
|
|
8c1a2e |
+ {
|
|
|
8c1a2e |
+ fputs("Can't identify disc\n", stderr);
|
|
|
8c1a2e |
+ return 1;
|
|
|
8c1a2e |
+ }
|
|
|
8c1a2e |
+
|
|
|
8c1a2e |
+ if(global.nsectors)
|
|
|
8c1a2e |
+ {
|
|
|
8c1a2e |
+ tmpdrive->nsectors = global.nsectors;
|
|
|
8c1a2e |
+ tmpdrive->bigbuff = global.nsectors * CD_FRAMESIZE_RAW;
|
|
|
8c1a2e |
+ }
|
|
|
8c1a2e |
+ if (cdda_open(tmpdrive) != 0)
|
|
|
8c1a2e |
+ {
|
|
|
8c1a2e |
+ fputs("Can't open disc\n", stderr);
|
|
|
8c1a2e |
+ cdda_close(tmpdrive);
|
|
|
8c1a2e |
+ return 1;
|
|
|
8c1a2e |
+ }
|
|
|
8c1a2e |
+ global.cdp = paranoia_init(tmpdrive);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (global.paranoia_parms.overlap >= 0) {
|
|
|
8c1a2e |
int overlap = global.paranoia_parms.overlap;
|
|
|
8c1a2e |
@@ -2902,17 +2923,7 @@ Rate Divider Rate Divider
|
|
|
8c1a2e |
overlap = global.nsectors - 1;
|
|
|
8c1a2e |
paranoia_overlapset(global.cdp, overlap);
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
- /*
|
|
|
8c1a2e |
- * Default to a minimum of dynamic overlapping == 0.5 sectors.
|
|
|
8c1a2e |
- * If we don't do this, we get the default from libparanoia
|
|
|
8c1a2e |
- * which is approx. 0.1.
|
|
|
8c1a2e |
- */
|
|
|
8c1a2e |
- if (global.paranoia_parms.mindynoverlap < 0)
|
|
|
8c1a2e |
- paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1);
|
|
|
8c1a2e |
- paranoia_dynoverlapset(global.cdp,
|
|
|
8c1a2e |
- global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS,
|
|
|
8c1a2e |
- global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
+
|
|
|
8c1a2e |
paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (global.paranoia_parms.disable_paranoia) {
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/icedax.h.paranoiacdda cdrkit-1.1.11/icedax/icedax.h
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/icedax.h.paranoiacdda 2012-07-31 14:27:15.216157005 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/icedax.h 2012-07-31 14:27:15.217157039 +0200
|
|
|
8c1a2e |
@@ -41,7 +41,7 @@
|
|
|
8c1a2e |
|
|
|
8c1a2e |
/* Endianess */
|
|
|
8c1a2e |
#define GUESS (-2)
|
|
|
8c1a2e |
-#define NONE (-1)
|
|
|
8c1a2e |
+#define NONE_EN (-1)
|
|
|
8c1a2e |
#define LITTLE 0
|
|
|
8c1a2e |
#define BIG 1
|
|
|
8c1a2e |
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/interface.c.paranoiacdda cdrkit-1.1.11/icedax/interface.c
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/interface.c.paranoiacdda 2012-07-31 14:27:15.235157650 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/interface.c 2012-07-31 14:27:15.232157548 +0200
|
|
|
8c1a2e |
@@ -116,7 +116,7 @@ int (*Play_at)(SCSI *usalp, unsigned in
|
|
|
8c1a2e |
int (*StopPlay)(SCSI *usalp);
|
|
|
8c1a2e |
void (*trash_cache)(UINT4 *p, unsigned lSector, unsigned SectorBurstVal);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-#if defined USE_PARANOIA
|
|
|
8c1a2e |
+#if 0 //defined USE_PARANOIA
|
|
|
8c1a2e |
long cdda_read(void *d, void *buffer, long beginsector, long sectors);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
long cdda_read(void *d, void *buffer, long beginsector, long sectors)
|
|
|
8c1a2e |
diff -up cdrkit-1.1.11/icedax/toc.c.paranoiacdda cdrkit-1.1.11/icedax/toc.c
|
|
|
8c1a2e |
--- cdrkit-1.1.11/icedax/toc.c.paranoiacdda 2012-07-31 14:27:15.225157311 +0200
|
|
|
8c1a2e |
+++ cdrkit-1.1.11/icedax/toc.c 2012-07-31 14:27:15.230157480 +0200
|
|
|
8c1a2e |
@@ -379,8 +379,7 @@ static void emit_cddb_form(char *fname_b
|
|
|
8c1a2e |
static void emit_cdindex_form(char *fname_baseval);
|
|
|
8c1a2e |
#endif
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-typedef struct TOC { /* structure of table of contents (cdrom) */
|
|
|
8c1a2e |
+typedef struct TOC_t { /* structure of table of contents (cdrom) */
|
|
|
8c1a2e |
unsigned char reserved1;
|
|
|
8c1a2e |
unsigned char bFlags;
|
|
|
8c1a2e |
unsigned char bTrack;
|
|
|
8c1a2e |
@@ -391,8 +390,7 @@ typedef struct TOC { /* structure of tab
|
|
|
8c1a2e |
int frms;
|
|
|
8c1a2e |
unsigned char ISRC[16];
|
|
|
8c1a2e |
int SCMS;
|
|
|
8c1a2e |
-} TOC;
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
+} TOC_t;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
/* Flags contains two fields:
|
|
|
8c1a2e |
bits 7-4 (ADR)
|
|
|
8c1a2e |
@@ -432,7 +430,7 @@ struct iterator {
|
|
|
8c1a2e |
int index;
|
|
|
8c1a2e |
int startindex;
|
|
|
8c1a2e |
void (*reset)(struct iterator *this);
|
|
|
8c1a2e |
- struct TOC *(*getNextTrack)(struct iterator *this);
|
|
|
8c1a2e |
+ struct TOC_t *(*getNextTrack)(struct iterator *this);
|
|
|
8c1a2e |
int (*hasNextTrack)(struct iterator *this);
|
|
|
8c1a2e |
};
|
|
|
8c1a2e |
|
|
|
8c1a2e |
@@ -518,7 +516,7 @@ unsigned FixupTOC(unsigned no_tracks)
|
|
|
8c1a2e |
InitIterator(&i, 1);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (IS__AUDIO(p)) count_audio_tracks++;
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
|
|
|
8c1a2e |
@@ -733,7 +731,7 @@ static void emit_cddb_form(char *fname_b
|
|
|
8c1a2e |
fprintf( cddb_form, "# Track frame offsets:\n#\n");
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (GETTRACK(p) == CDROM_LEADOUT) break;
|
|
|
8c1a2e |
fprintf( cddb_form,
|
|
|
8c1a2e |
"# %lu\n", 150 + Get_AudioStartSector(GETTRACK(p)));
|
|
|
8c1a2e |
@@ -765,7 +763,7 @@ static void emit_cddb_form(char *fname_b
|
|
|
8c1a2e |
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int ii;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
ii = GETTRACK(p);
|
|
|
8c1a2e |
@@ -788,7 +786,7 @@ static void emit_cddb_form(char *fname_b
|
|
|
8c1a2e |
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int ii;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
ii = GETTRACK(p);
|
|
|
8c1a2e |
@@ -1495,7 +1493,7 @@ static int IsSingleArtist(void)
|
|
|
8c1a2e |
InitIterator(&i, 1);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int ii;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (IS__DATA(p) || GETTRACK(p) == CDROM_LEADOUT) continue;
|
|
|
8c1a2e |
@@ -1681,7 +1679,7 @@ static void emit_cdindex_form(char *fnam
|
|
|
8c1a2e |
global.creator ? ascii2html(global.creator) : "");
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int ii = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (ii == CDROM_LEADOUT) break;
|
|
|
8c1a2e |
@@ -1703,7 +1701,7 @@ static void emit_cdindex_form(char *fnam
|
|
|
8c1a2e |
fprintf( cdindex_form, " <MultipleArtistCD>\n");
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int ii = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (ii == CDROM_LEADOUT) break;
|
|
|
8c1a2e |
@@ -1942,9 +1940,9 @@ static void DisplayToc_with_gui(unsigned
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if ((global.verbose & (SHOW_TOC | SHOW_STARTPOSITIONS | SHOW_SUMMARY | SHOW_TITLES)) != 0
|
|
|
8c1a2e |
&& i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int from;
|
|
|
8c1a2e |
from = GETTRACK(o);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
@@ -2072,9 +2070,9 @@ static void DisplayToc_no_gui(unsigned l
|
|
|
8c1a2e |
count_audio_trks = 0;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int from;
|
|
|
8c1a2e |
from = GETTRACK(o);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
@@ -2131,10 +2129,10 @@ static void DisplayToc_no_gui(unsigned l
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
if ((global.verbose & SHOW_TOC) != 0 &&
|
|
|
8c1a2e |
i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
for (; i.hasNextTrack(&i);) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if ( GETTRACK(o) <= MAXTRK ) {
|
|
|
8c1a2e |
unsigned char brace1, brace2;
|
|
|
8c1a2e |
@@ -2189,9 +2187,9 @@ static void DisplayToc_no_gui(unsigned l
|
|
|
8c1a2e |
ii = 0;
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
if (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
for ( ; i.hasNextTrack(&i);) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
fprintf ( stderr,
|
|
|
8c1a2e |
" %2u.(%8u)",
|
|
|
8c1a2e |
GETTRACK(o),
|
|
|
8c1a2e |
@@ -2248,7 +2246,7 @@ static void DisplayToc_no_gui(unsigned l
|
|
|
8c1a2e |
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
for ( ; i.hasNextTrack(&i);) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int jj = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if ( global.tracktitle[jj] != NULL ) {
|
|
|
8c1a2e |
@@ -2260,7 +2258,7 @@ static void DisplayToc_no_gui(unsigned l
|
|
|
8c1a2e |
|
|
|
8c1a2e |
i.reset(&i);
|
|
|
8c1a2e |
for ( ; i.hasNextTrack(&i); ) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
int jj;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (IS__DATA(p))
|
|
|
8c1a2e |
@@ -2720,7 +2718,7 @@ void Read_MCN_ISRC(void)
|
|
|
8c1a2e |
InitIterator(&i, 1);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
unsigned ii = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (ii == CDROM_LEADOUT) break;
|
|
|
8c1a2e |
@@ -3155,7 +3153,7 @@ unsigned ScanIndices(unsigned track, uns
|
|
|
8c1a2e |
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- struct TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ struct TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
unsigned ii = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if ( ii < starttrack || IS__DATA(p) )
|
|
|
8c1a2e |
@@ -3322,7 +3320,7 @@ unsigned char *Get_MCN(void)
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-static TOC g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
|
|
|
8c1a2e |
+static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
|
|
|
8c1a2e |
|
|
|
8c1a2e |
/*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/
|
|
|
8c1a2e |
|
|
|
8c1a2e |
@@ -3397,10 +3395,10 @@ static int patch_cd_extra(unsigned track
|
|
|
8c1a2e |
|
|
|
8c1a2e |
static int restrict_tracks_illleadout(void)
|
|
|
8c1a2e |
{
|
|
|
8c1a2e |
- struct TOC *o = &g_toc[cdtracks+1];
|
|
|
8c1a2e |
+ struct TOC_t *o = &g_toc[cdtracks+1];
|
|
|
8c1a2e |
int i;
|
|
|
8c1a2e |
for (i = cdtracks; i >= 0; i--) {
|
|
|
8c1a2e |
- struct TOC *p = &g_toc[i];
|
|
|
8c1a2e |
+ struct TOC_t *p = &g_toc[i];
|
|
|
8c1a2e |
if (GETSTART(o) > GETSTART(p)) break;
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
patch_cd_extra(i+1, GETSTART(o));
|
|
|
8c1a2e |
@@ -3523,7 +3521,7 @@ static void it_reset(struct iterator *th
|
|
|
8c1a2e |
|
|
|
8c1a2e |
|
|
|
8c1a2e |
static int it_hasNextTrack(struct iterator *this);
|
|
|
8c1a2e |
-static struct TOC *it_getNextTrack(struct iterator *this);
|
|
|
8c1a2e |
+static struct TOC_t *it_getNextTrack(struct iterator *this);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
static int it_hasNextTrack(struct iterator *this)
|
|
|
8c1a2e |
{
|
|
|
8c1a2e |
@@ -3532,7 +3530,7 @@ static int it_hasNextTrack(struct iterat
|
|
|
8c1a2e |
|
|
|
8c1a2e |
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-static struct TOC *it_getNextTrack(struct iterator *this)
|
|
|
8c1a2e |
+static struct TOC_t *it_getNextTrack(struct iterator *this)
|
|
|
8c1a2e |
{
|
|
|
8c1a2e |
/* if ( (*this->hasNextTrack)(this) == 0 ) return NULL; */
|
|
|
8c1a2e |
if ( this->index > (int)cdtracks+1 ) return NULL;
|
|
|
8c1a2e |
@@ -3583,7 +3581,7 @@ long Get_AudioStartSector(unsigned long
|
|
|
8c1a2e |
if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (GETTRACK(p) == p_track) {
|
|
|
8c1a2e |
if (IS__DATA(p)) {
|
|
|
8c1a2e |
@@ -3613,7 +3611,7 @@ long Get_StartSector(unsigned long p_tra
|
|
|
8c1a2e |
if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (GETTRACK(p) == p_track) {
|
|
|
8c1a2e |
return GETSTART(p);
|
|
|
8c1a2e |
@@ -3637,7 +3635,7 @@ long Get_EndSector(unsigned long p_track
|
|
|
8c1a2e |
if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (GETTRACK(p) == p_track) {
|
|
|
8c1a2e |
p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (p == NULL) {
|
|
|
8c1a2e |
@@ -3669,7 +3667,7 @@ long FirstAudioTrack(void)
|
|
|
8c1a2e |
else i.reset(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
unsigned ii = GETTRACK(p);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (ii == CDROM_LEADOUT) break;
|
|
|
8c1a2e |
@@ -3687,7 +3685,7 @@ long FirstDataTrack(void)
|
|
|
8c1a2e |
else i.reset(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (IS__DATA(p)) {
|
|
|
8c1a2e |
return GETTRACK(p);
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
@@ -3708,7 +3706,7 @@ long LastAudioTrack(void)
|
|
|
8c1a2e |
else i.reset(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if (IS__AUDIO(p) && (GETTRACK(p) != CDROM_LEADOUT)) {
|
|
|
8c1a2e |
j = GETTRACK(p);
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
@@ -3730,7 +3728,7 @@ long Get_LastSectorOnCd(unsigned long p_
|
|
|
8c1a2e |
if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT;
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (GETTRACK(p) < p_track)
|
|
|
8c1a2e |
continue;
|
|
|
8c1a2e |
@@ -3749,9 +3747,9 @@ int Get_Track(unsigned long sector)
|
|
|
8c1a2e |
else i.reset(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *o = i.getNextTrack(&i);
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
if ((GETSTART(o) <= sector) && (GETSTART(p) > sector)) {
|
|
|
8c1a2e |
if (IS__DATA(o)) {
|
|
|
8c1a2e |
return -1;
|
|
|
8c1a2e |
@@ -3772,7 +3770,7 @@ int CheckTrackrange(unsigned long from,
|
|
|
8c1a2e |
else i.reset(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
while (i.hasNextTrack(&i)) {
|
|
|
8c1a2e |
- TOC *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
+ TOC_t *p = i.getNextTrack(&i);
|
|
|
8c1a2e |
|
|
|
8c1a2e |
if (GETTRACK(p) < from)
|
|
|
8c1a2e |
continue;
|
|
|
8c1a2e |
@@ -3788,54 +3786,3 @@ int CheckTrackrange(unsigned long from,
|
|
|
8c1a2e |
return 0;
|
|
|
8c1a2e |
}
|
|
|
8c1a2e |
|
|
|
8c1a2e |
-#ifdef USE_PARANOIA
|
|
|
8c1a2e |
-long cdda_disc_firstsector(void *d);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_disc_firstsector(void *d)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_StartSector(FirstAudioTrack());
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_tracks(void *d);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_tracks(void *d)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return LastAudioTrack() - FirstAudioTrack() +1;
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_track_audiop(void *d, int track);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_track_audiop(void *d, int track)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_Datatrack(track) == 0;
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_track_firstsector(void *d, int track);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_track_firstsector(void *d, int track)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_AudioStartSector(track);
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_track_lastsector(void *d, int track);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_track_lastsector(void *d, int track)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_EndSector(track);
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_disc_lastsector(void *d);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-long cdda_disc_lastsector(void *d)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_LastSectorOnCd(cdtracks) - 1;
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_sector_gettrack(void *d,long sector);
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-int cdda_sector_gettrack(void *d, long sector)
|
|
|
8c1a2e |
-{
|
|
|
8c1a2e |
- return Get_Track(sector);
|
|
|
8c1a2e |
-}
|
|
|
8c1a2e |
-
|
|
|
8c1a2e |
-#endif
|