1
/* cdrdao - write audio CD-Rs in disc-at-once mode
3
* Copyright (C) 1998-2002 Andreas Mueller <mueller@daneb.ping.de>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
#include <sys/types.h>
26
/* Encodes a MODE 0 sector.
27
* 'adr' is the current physical sector address
28
* 'sector' must be 2352 byte wide
30
void lec_encode_mode0_sector(u_int32_t adr, u_int8_t *sector);
32
/* Encodes a MODE 1 sector.
33
* 'adr' is the current physical sector address
34
* 'sector' must be 2352 byte wide containing 2048 bytes user data at
37
void lec_encode_mode1_sector(u_int32_t adr, u_int8_t *sector);
39
/* Encodes a MODE 2 sector.
40
* 'adr' is the current physical sector address
41
* 'sector' must be 2352 byte wide containing 2336 bytes user data at
44
void lec_encode_mode2_sector(u_int32_t adr, u_int8_t *sector);
46
/* Encodes a XA form 1 sector.
47
* 'adr' is the current physical sector address
48
* 'sector' must be 2352 byte wide containing 2048+8 bytes user data at
51
void lec_encode_mode2_form1_sector(u_int32_t adr, u_int8_t *sector);
53
/* Encodes a XA form 2 sector.
54
* 'adr' is the current physical sector address
55
* 'sector' must be 2352 byte wide containing 2324+8 bytes user data at
58
void lec_encode_mode2_form2_sector(u_int32_t adr, u_int8_t *sector);
60
/* Scrambles and byte swaps an encoded sector.
61
* 'sector' must be 2352 byte wide.
63
void lec_scramble(u_int8_t *sector);