chd

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: GPL-3.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads sectors from a CHD V5 disc image.

func Open

func Open(r io.ReaderAt, size int64) (*Reader, error)

Open parses a CHD V5 file and returns a Reader. The caller must provide an io.ReaderAt and the total file size.

func (*Reader) Close

func (rd *Reader) Close()

Close releases resources held by the reader.

func (*Reader) ReadSector

func (rd *Reader) ReadSector(lba int) ([]byte, error)

ReadSector returns the 2352-byte sector data at the given LBA.

func (*Reader) Tracks

func (rd *Reader) Tracks() []Track

Tracks returns a copy of the track list.

type Track

type Track struct {
	Number  int
	Type    string // "MODE1_RAW", "AUDIO", etc.
	Frames  int
	Pregap  int
	Control uint8 // CTRL/ADR byte (0x41=data, 0x01=audio)
	// contains filtered or unexported fields
}

Track describes a single CD track from CHD metadata.

func (Track) StartLBA

func (t Track) StartLBA() int

StartLBA returns the first data LBA for this track.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL