#include <cdio/cdda.h>
Go to the source code of this file.
#define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2) |
Paranoia likes to work with 16-bit numbers rather than (possibly byte-swapped) bytes. So there are this many 16-bit numbers block (frame, or sector) read.
#define paranoia_free cdio_paranoia_free |
#define paranoia_init cdio_paranoia_init |
For compatibility with good ol' paranoia
#define paranoia_modeset cdio_paranoia_modeset |
#define paranoia_overlapset cdio_paranoia_overlapset |
#define paranoia_read cdio_paranoia_read |
#define paranoia_read_limited cdio_paranoia_read_limited |
#define paranoia_seek cdio_paranoia_seek |
#define paranoia_set_range cdio_paranoia_set_range |
enum paranoia_cb_mode_t |
Flags set in a callback.
The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to PARANOIA_CB_READ and get the correct value.
enum paranoia_mode_t |
Flags used in paranoia_modeset.
The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to PARANOIA_MODE_DISABLE and get the correct value.
void cdio_paranoia_free | ( | cdrom_paranoia_t * | p | ) |
Free any resources associated with p.
p | paranoia object to for which resources are to be freed. |
cdrom_paranoia_t* cdio_paranoia_init | ( | cdrom_drive_t * | d | ) |
Get and initialize a new cdrom_paranoia object from cdrom_drive. Run this before calling any of the other paranoia routines below.
void cdio_paranoia_modeset | ( | cdrom_paranoia_t * | p, | |
int | mode_flags | |||
) |
Set the kind of repair you want to on for reading. The modes are listed above
p | paranoia type | |
mode_flags | paranoia mode flags built from values in paranoia_mode_t, e.g. PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP |
void cdio_paranoia_overlapset | ( | cdrom_paranoia_t * | p, | |
long | overlap | |||
) |
a temporary hack
int16_t* cdio_paranoia_read | ( | cdrom_paranoia_t * | p, | |
void(*)(long int, paranoia_cb_mode_t) | callback | |||
) |
Reads the next sector of audio data and returns a pointer to a full sector of verified samples.
p | paranoia object. | |
callback | callback routine which gets called with the status on each read. |
int16_t* cdio_paranoia_read_limited | ( | cdrom_paranoia_t * | p, | |
void(*)(long int, paranoia_cb_mode_t) | callback, | |||
int | max_retries | |||
) |
The same as cdio_paranoia_read but the number of retries is set.
p | paranoia object. | |
callback | callback routine which gets called with the status on each read. | |
max_retries | number of times to try re-reading a block before failing. |
lsn_t cdio_paranoia_seek | ( | cdrom_paranoia_t * | p, | |
off_t | seek, | |||
int | whence | |||
) |
reposition reading offset.
p | paranoia type | |
seek | byte offset to seek to | |
whence | like corresponding parameter in libc's lseek, e.g. SEEK_SET or SEEK_END. |
void cdio_paranoia_set_range | ( | cdrom_paranoia_t * | p, | |
long int | start, | |||
long int | end | |||
) |
The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions
const char* paranoia_cb_mode2str[] |