1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
* Exports (libparanoia) cdda_paranoia.h
*/
cdrom_paranoia *paranoia_init __PR((void * d, int nsectors));
void paranoia_modeset __PR((cdrom_paranoia * p, int mode));
long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode));
Int16_t *paranoia_read __PR((cdrom_paranoia * p, void (*callback) (long, int)));
Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p, void (*callback) (long, int), int maxretries));
void paranoia_free __PR((cdrom_paranoia * p));
void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap));
/*
* Exports ?? (libparanoia) overlap.h
*/
extern void paranoia_resetall __PR((cdrom_paranoia * p));
extern void paranoia_resetcache __PR((cdrom_paranoia * p));
Supported:
PARANOIA_MODE_VERIFY
PARANOIA_MODE_OVERLAP
PARANOIA_MODE_NEVERSKIP
Unsupported:
PARANOIA_MODE_FRAGMENT
PARANOIA_MODE_SCRATCH
PARANOIA_MODE_REPAIR
/*
* Imports (global Code)
*/
cdda_disc_firstsector (cdrom_drive *d) -> long sector
cdda_disc_lastsector (cdrom_drive *d) -> long sector
cdda_read (cdrom_drive *d, void *buffer, long beginsector, long sectors) -> long sectors
cdda_sector_gettrack (cdrom_drive *d,long sector) -> int trackno
cdda_track_audiop (cdrom_drive *d,int track) -> int ??? /* Is audiotrack */
cdda_track_firstsector (cdrom_drive *d,int track) -> long sector
cdda_track_lastsector (cdrom_drive *d,int track) -> long sector
cdda_tracks (cdrom_drive *d) -> int tracks
callback (long inpos, int function)
/*
* Imports (libc)
*/
calloc
free
malloc
realloc
memcmp
memcpy
memmove
memset
qsort
/*--------------------------------------------------------------------------*/
usalp = usal_open();
bufsize = usal_bufsize(usalp, CDR_BUF_SIZE);
nsecs = bufsize / SEC_SIZE;
cdp = paranoia_init(usalp, nsecs);
# paranoia_modeset(cdp, mode);
# paranoia_overlapset(cdp, overlap);
while (not ready) {
bp = paranoia_read(cdp, NULL);
write(f, bp, SEC_SISE);
}
paranoia_free(cdp);
|