/* cdrdao - write audio CD-Rs in disc-at-once mode1*2* Copyright (C) 1998-2002 Andreas Mueller <[email protected]>3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License15* along with this program; if not, write to the Free Software16* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.17*/1819#ifndef __LEC_H__20#define __LEC_H__2122#ifdef HAVE_CONFIG_H23#include <config.h>24#endif2526#include <sys/types.h>27#include <inttypes.h>2829typedef uint32_t u_int32_t;30typedef uint16_t u_int16_t;31typedef uint8_t u_int8_t;3233#ifndef TRUE34#define TRUE 135#endif3637/* Encodes a MODE 0 sector.38* 'adr' is the current physical sector address39* 'sector' must be 2352 byte wide40*/41void lec_encode_mode0_sector(u_int32_t adr, u_int8_t *sector);4243/* Encodes a MODE 1 sector.44* 'adr' is the current physical sector address45* 'sector' must be 2352 byte wide containing 2048 bytes user data at46* offset 1647*/48void lec_encode_mode1_sector(u_int32_t adr, u_int8_t *sector);4950/* Encodes a MODE 2 sector.51* 'adr' is the current physical sector address52* 'sector' must be 2352 byte wide containing 2336 bytes user data at53* offset 1654*/55void lec_encode_mode2_sector(u_int32_t adr, u_int8_t *sector);5657/* Encodes a XA form 1 sector.58* 'adr' is the current physical sector address59* 'sector' must be 2352 byte wide containing 2048+8 bytes user data at60* offset 1661*/62void lec_encode_mode2_form1_sector(u_int32_t adr, u_int8_t *sector);6364/* Encodes a XA form 2 sector.65* 'adr' is the current physical sector address66* 'sector' must be 2352 byte wide containing 2324+8 bytes user data at67* offset 1668*/69void lec_encode_mode2_form2_sector(u_int32_t adr, u_int8_t *sector);7071/* Scrambles and byte swaps an encoded sector.72* 'sector' must be 2352 byte wide.73*/74void lec_scramble(u_int8_t *sector);7576#endif777879