coastline 0.0.4
Loading...
Searching...
No Matches
coastline::DiscTrackReader Class Reference

Read bounded sectors across the ordered parts of a disc track. More...

#include <disctrackreader.h>

Public Member Functions

 DiscTrackReader (const CueTrack &track)
 Validate track extents against their files without loading their contents.
bool Read (std::uint64_t sector, std::uint32_t count, std::span< std::uint8_t > output)
 Read complete stored sectors, including any headers and subchannel bytes.

Detailed Description

Read bounded sectors across the ordered parts of a disc track.

Constructor & Destructor Documentation

◆ DiscTrackReader()

coastline::DiscTrackReader::DiscTrackReader ( const CueTrack & track)
explicit

Validate track extents against their files without loading their contents.

Invalid tracks cause every subsequent Read() call to fail.

Parameters
trackTrack with sector stride, total length, and optional split-file extents.

Member Function Documentation

◆ Read()

bool coastline::DiscTrackReader::Read ( std::uint64_t sector,
std::uint32_t count,
std::span< std::uint8_t > output )

Read complete stored sectors, including any headers and subchannel bytes.

Parameters
sectorFirst sector relative to the start of the track, excluding its pregap.
countNumber of sectors to read.
outputDestination of exactly count times the stored sector stride bytes.
Returns
Whether the track is valid and every requested byte is read. Failure may partially modify output. Requests outside the track or with a mismatched output size fail before reading.

The documentation for this class was generated from the following file: