DragonCdTrack Class

One track of an audio CD. More...

Header: #include <DragonCdTrack>
CMake: find_package(DragonMediaBackend REQUIRED COMPONENTS DragonMediaBackend)
target_link_libraries(mytarget PRIVATE DragonMediaBackend::DragonMediaBackend)
In QML: dragonCdTrack

Properties

Public Functions

DragonCdTrack()
DragonCdTrack(const DragonCdTrack &other)
DragonCdTrack(DragonCdTrack &&other)
std::chrono::milliseconds duration() const
bool isAudio() const
int lengthFrames() const
int number() const
int startFrame() const
QUrl url() const
DragonCdTrack &operator=(DragonCdTrack &&other)
DragonCdTrack &operator=(const DragonCdTrack &other)
bool operator==(const DragonCdTrack &other) const

Detailed Description

Includes the basic information available from a audio CD's table of contents.

See also DragonCdToc and DragonCdTocReader.

Property Documentation

[read-only] audio : const bool

Whether this track holds audio, false for the data track of a mixed-mode disc.

Access functions:

bool isAudio() const

[read-only] duration : const DragonDuration

The duration of the track.

Access functions:

std::chrono::milliseconds duration() const

[read-only] lengthFrames : const int

The length of the track in frames; lengthFrames() * 1000 / 75 is the duration in milliseconds.

Access functions:

int lengthFrames() const

[read-only] number : const int

The track number as reported by the disc (1..99), not a list index.

Access functions:

int number() const

[read-only] startFrame : const int

The start position of the track in audio frames (sectors): 75 frames equal one second.

Access functions:

int startFrame() const

[read-only] url : const QUrl

The URL that plays this track through DragonPlayer, for example audiocd:/Track 03.wav?track=3&device=/dev/sr0. Empty for data tracks.

Access functions:

QUrl url() const

Member Function Documentation

DragonCdTrack::DragonCdTrack()

Constructs a null track with number 0, an empty url, and a zero duration.

DragonCdTrack::DragonCdTrack(const DragonCdTrack &other)

Copies other. The underlying data is implicitly shared.

[noexcept] DragonCdTrack::DragonCdTrack(DragonCdTrack &&other)

Move-constructs the track of other, which is left as a placeholder.

std::chrono::milliseconds DragonCdTrack::duration() const

Returns the duration of the track. The value serves the duration property through the implicit conversion of DragonDuration.

Note: Getter function for property duration.

bool DragonCdTrack::isAudio() const

Returns false for the data track of a mixed-mode disc.

Note: Getter function for property audio.

int DragonCdTrack::lengthFrames() const

Returns the length of the track in frames.

Note: Getter function for property lengthFrames.

int DragonCdTrack::number() const

Returns the track number as reported by the TOC (1..99; not a list index).

Note: Getter function for property number.

int DragonCdTrack::startFrame() const

Returns the start position in frames. Useful for CDDB lookups.

Note: Getter function for property startFrame.

QUrl DragonCdTrack::url() const

Returns the playable URL of this track: audiocd:/Track NN.wav?track=N&device=... matching the scheme DragonCdStream parses. Data tracks report an empty URL.

Note: Getter function for property url.

[noexcept] DragonCdTrack &DragonCdTrack::operator=(DragonCdTrack &&other)

Move-assigns the track of other, which is left as a placeholder.

DragonCdTrack &DragonCdTrack::operator=(const DragonCdTrack &other)

Assigns other to this object. The underlying data is implicitly shared.

bool DragonCdTrack::operator==(const DragonCdTrack &other) const

Returns true if other describes the same track of the same disc.