libcdio-paranoia 10.2+2.0.2
|
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <cdio/paranoia/cdda.h>
#include "../cdda_interface/smallft.h"
#include <cdio/paranoia/version.h>
#include "p_block.h"
#include <cdio/paranoia/paranoia.h>
#include "overlap.h"
#include "gap.h"
#include "isort.h"
#include <errno.h>
Data Structures | |
struct | sync_result |
Macros | |
#define | MIN_SEEK_MS 6 |
#define | rc(r) (r->vector) |
#define | OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1) |
Typedefs | |
typedef struct sync_result | sync_result_t |
Enumerations | |
enum | { FLAGS_EDGE =0x1 , FLAGS_UNREAD =0x2 , FLAGS_VERIFIED =0x4 } |
Functions | |
void | paranoia_free (cdrom_paranoia_t *p) |
void | paranoia_modeset (cdrom_paranoia_t *p, int mode_flags) |
lsn_t | paranoia_seek (cdrom_paranoia_t *p, int32_t seek, int whence) |
int16_t * | cdio_paranoia_read (cdrom_paranoia_t *p, void(*callback)(long, paranoia_cb_mode_t)) |
int16_t * | cdio_paranoia_read_limited (cdrom_paranoia_t *p, void(*callback)(long int, paranoia_cb_mode_t), int max_retries) |
void | cdio_paranoia_overlapset (cdrom_paranoia_t *p, long int overlap) |
const char * | cdio_paranoia_version (void) |
Variables | |
const char * | paranoia_cb_mode2str [] |
paranoia_mode_t | debug_paranoia_mode |
paranoia_cb_mode_t | debug_paranoia_cb_mode |
enum { ... } | paranoia_read_flags |
#define MIN_SEEK_MS 6 |
#define OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1) |
#define rc | ( | r | ) | (r->vector) |
typedef struct sync_result sync_result_t |
anonymous enum |
Flags indicating the status of a read samples.
Imagine the below enumeration values are #defines to be used in a bitmask rather than distinct values of an enum.
The variable part of the declaration is trickery to force the enum symbol values to be recorded in debug symbol tables. They are used to allow one refer to the enumeration value names in a debugger and in debugger expressions.
Enumerator | |
---|---|
FLAGS_EDGE | first/last N words of frame |
FLAGS_UNREAD | unread, hence missing and unmatchable |
FLAGS_VERIFIED | block read and verified |
void cdio_paranoia_overlapset | ( | cdrom_paranoia_t * | p, |
long int | overlap | ||
) |
int16_t * cdio_paranoia_read | ( | cdrom_paranoia_t * | p, |
void(*)(long, paranoia_cb_mode_t) | callback | ||
) |
========================================================================== cdio_paranoia_read(), cdio_paranoia_read_limited()
These functions "read" the next sector of audio data and returns a pointer to a full sector of verified samples (2352 bytes).
The returned buffer is not to be freed by the caller. It will persist only until the next call to paranoia_read() for this p
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. |
const char * cdio_paranoia_version | ( | void | ) |
void paranoia_free | ( | cdrom_paranoia_t * | p | ) |
void 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 |
lsn_t paranoia_seek | ( | cdrom_paranoia_t * | p, |
int32_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. |
paranoia_cb_mode_t debug_paranoia_cb_mode |
paranoia_mode_t debug_paranoia_mode |
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[] |
enum { ... } paranoia_read_flags |
Flags indicating the status of a read samples.
Imagine the below enumeration values are #defines to be used in a bitmask rather than distinct values of an enum.
The variable part of the declaration is trickery to force the enum symbol values to be recorded in debug symbol tables. They are used to allow one refer to the enumeration value names in a debugger and in debugger expressions.