arcstk::v_1_0_0::CDDA struct final

Constants related to the CDDA format.

Public static variables

static int BITS_PER_SAMPLE constexpr
CDDA: 16 bits per sample.
static int BYTES_PER_FRAME constexpr
Total number of bytes per frame is 2352.
static int BYTES_PER_SAMPLE constexpr
Total number of bytes per sample is 4.
static int FRAMES_PER_SEC constexpr
Total number of frames per second is 75.
static lba_count_t MAX_BLOCK_ADDRESS constexpr
Redbook maximal value for a valid LBA frame index is 449.999.
static lba_count_t MAX_OFFSET constexpr
Redbook maximal valid offset value is 359.999 LBA frames.
static int MAX_TRACKCOUNT constexpr
Maximal valid track count is 99.
static lba_count_t MIN_TRACK_LEN_FRAMES constexpr
Minimal number of LBA frames a track contains is 150.
static lba_count_t MIN_TRACK_OFFSET_DIST constexpr
Two subsequenct offsets must have a distance of at least 300 LBA frames.
static int NUMBER_OF_CHANNELS constexpr
CDDA: stereo involves 2 channels.
static int SAMPLES_PER_FRAME constexpr
Total number of samples per frame is 588.
static int SAMPLES_PER_SECOND constexpr
CDDA: sampling rate of 44100 samples per second.

Variable documentation

static int arcstk::v_1_0_0::CDDA::BYTES_PER_FRAME constexpr

Total number of bytes per frame is 2352.

This follows from CDDA where 1 frame == 588 samples * 4 bytes/sample

static int arcstk::v_1_0_0::CDDA::BYTES_PER_SAMPLE constexpr

Total number of bytes per sample is 4.

This follows from CDDA where 1 sample == 16 bit/sample * 2 channels / 8 bits/byte

static lba_count_t arcstk::v_1_0_0::CDDA::MAX_BLOCK_ADDRESS constexpr

Redbook maximal value for a valid LBA frame index is 449.999.

Redbook defines 99:59.74 (MSF) as maximal valid block adress. This is equivalent to 449.999 frames.

static lba_count_t arcstk::v_1_0_0::CDDA::MAX_OFFSET constexpr

Redbook maximal valid offset value is 359.999 LBA frames.

Redbook defines 79:59.74 (MSF) (+leadin+leadout) as maximal play duration. This is equivalent to 360.000 frames, thus the maximal valid offset is LBA frame index 359.999.

static lba_count_t arcstk::v_1_0_0::CDDA::MIN_TRACK_LEN_FRAMES constexpr

Minimal number of LBA frames a track contains is 150.

The CDDA conforming minmal track length is 4 seconds including 2 seconds pause but the pause does not contribute to the track lengths, thus 2 sec * 75 frames/sec == 150 frames.

static lba_count_t arcstk::v_1_0_0::CDDA::MIN_TRACK_OFFSET_DIST constexpr

Two subsequenct offsets must have a distance of at least 300 LBA frames.

The CDDA conforming minimal track length is 4 seconcs including 2 seconds pause, thus 4 sec * 75 frames/sec == 300 frames.

static int arcstk::v_1_0_0::CDDA::SAMPLES_PER_FRAME constexpr

Total number of samples per frame is 588.

This follows from CDDA where 1 frame == 44100 samples/sec / 75 frames/sec