为了获得全部磁盘能力,你需要将各部门的数目乘以每个部门的用户数据领域(光盘/XA(电子构造)模式2的长度为2336个,而不是2048个)。
光盘的一个部门拥有2048年的用户数据,而其他用途则有304个tes。 每一数据部门都由16位逐位负责人组成:
- 12-byte sync field (00 ff ff ff ff ff ff ff ff ff ff 00)
- 3 byte address (minute, second, fraction (1/75th) of a second)
- 1 byte mode
该模式决定了该行业其余2336名特工认为什么:
- Mode 0: null data; serves no practical purpose for CD recording
- Mode 1: the typical CD-ROM layout
2048 bytes of user data
4 bytes of EDC (Error Detection Code, a 32-bit CRC)
8 bytes of reserved space, set to zeros
172 bytes of "P" parity
104 bytes of "Q" parity
- Mode 2: 2336 bytes of user data, usually used for CD-ROM/XA
为了检索一个轨道上为这些部门提供的数据类型,您可使用以下方法:get_SectorType from 接口。
可能的部门类型由 enumeration:
typedef enum {
IMAPI_CD_SECTOR_AUDIO = 0x00,
IMAPI_CD_SECTOR_MODE_ZERO = 0x01,
IMAPI_CD_SECTOR_MODE1 = 0x02,
IMAPI_CD_SECTOR_MODE2FORM0 = 0x03,
IMAPI_CD_SECTOR_MODE2FORM1 = 0x04,
IMAPI_CD_SECTOR_MODE2FORM2 = 0x05,
IMAPI_CD_SECTOR_MODE1RAW = 0x06,
IMAPI_CD_SECTOR_MODE2FORM0RAW = 0x07,
IMAPI_CD_SECTOR_MODE2FORM1RAW = 0x08,
IMAPI_CD_SECTOR_MODE2FORM2RAW = 0x09
} IMAPI_CD_SECTOR_TYPE;
- IMAPI_CD_SECTOR_AUDIO
With this sector type, Audio data has 2352 bytes per sector/frame. This can be broken down into 588 contiguous samples, each sample being four bytes. The layout of a single sample matches the 16-bit stereo 44.1KHz WAV file data. This type of sector has no additional error correcting codes.
- IMAPI_CD_SECTOR_MODE_ZERO
With this sector type, user data has 2336 bytes per sector/frame. This seldom-used sector type contains all zero data, and is almost never seen in media today.
- IMAPI_CD_SECTOR_MODE1
With this sector type, user data has 2048 bytes per sector/frame. Mode1 data is the most common data form for pressed CD-ROM media. This data type also provides the greatest level of ECC/EDC among the standard sector types.
- IMAPI_CD_SECTOR_MODE2FORM0
With this sector type, user data has 2336 bytes per sector/frame. All Mode 2 sector types are also known as "CD-ROM XA" modes, which allows mixing of audio and data tracks on a single disc. This sector type is also known as Mode 2 "Formless", is considered deprecated, and is very seldom used.
- IMAPI_CD_SECTOR_MODE2FORM1
With this sector type, user data has 2048 bytes per sector/frame. All Mode 2 sector types are also known as "CD-ROM XA" modes, which allows mixing of audio and data tracks on a single disc.
- IMAPI_CD_SECTOR_MODE2FORM2
With this sector type, user data has 2336 bytes per sector/frame, of which the final four bytes are an optional CRC code (zero if not used). All Mode 2 sector types are also known as "CD-ROM XA" modes, which allows mixing of audio and data tracks on a single disc. This sector type is most often used when writing VideoCD discs.
- IMAPI_CD_SECTOR_MODE1RAW
With this sector type, user data has 2352 bytes per sector/frame. This is pre-processed Mode1Cooked data sectors, with sector header, ECC/EDC, and scrambling already added to the data stream.
- IMAPI_CD_SECTOR_MODE2FORM0RAW
With this sector type, user data has 2352 bytes per sector/frame. This is pre-processed Mode2Form0 data sectors, with sector header, ECC/EDC, and scrambling already added to the data stream.
- IMAPI_CD_SECTOR_MODE2FORM1RAW
With this sector type, user data has 2352 bytes per sector/frame. This is pre-processed Mode2Form1 data sectors, with sector header, ECC/EDC, and scrambling already added to the data stream.
- IMAPI_CD_SECTOR_MODE2FORM2RAW
With this sector type, user data has 2352 bytes per sector/frame. This is pre-processed Mode2Form2 data sectors, with sector header, ECC/EDC, and scrambling already added to the data stream.
Remarks:
Some sector types are not compatible with other sector types within a single image. The following are typical examples of this condition:
If the first track is audio, then all tracks must be audio.
If the first track is Mode1, then all tracks must be Mode1.
Only the three Mode2 (XA) sectors (Mode 2 Form 0, Mode 2 Form 1, and Mode 2 Form 2) may be mixed within a single disc image, and even then, only with other Mode 2 (XA) sector types.