pods::...DTrack(3pm)
πΏ NAME πΏ
Okay so this is the pods::...DTrack(3pm) page from the User Contributed Perl Documentation set, and it's literally all about SDL::CDTrack β the SDL Bindings for structure SDL_CDTrack. Periodt. π
ποΈ CATEGORY ποΈ
Core, CDROM, Structure β yes bestie, all three. It's giving core CD-ROM structure energy. β¨
π SYNOPSIS π
Okay so here's the whole vibe check: you set up CD-ROM stuff, count the drives, open the first drive's CD, check that the tray isn't empty, and grab track 0. Slay. π
use SDL;
use SDL::CDROM;
use SDL::CD ':status';
use SDL::CDTrack;
SDL::init( SDL_INIT_CDROM );
my $drives = SDL::CDROM::num_drives();
if( $drives > 0 )
{
my $CD = SDL::CD->new(0); #first drive's CD
if($CD)
{
if( $CD->status != CD_TRAYEMPTY )
{
my $track = SDL::CD->track(0);
}
}
}
π CONSTANTS π
The constants are exported by default. You can avoid this by doing:
use SDL::CDTrack ();
and access them directly:
SDL::CDTrack::SDL_AUDIO_TRACK;
or by choosing the export tags below:
Export tag: ':type'
SDL_AUDIO_TRACKSDL_DATA_TRACK
Those are the two constants, bestie β no more, no less. π«Ά
π§ METHOD π§
Here are the methods, bestie β all the deets, no cap. π¦
π id
$track->id() # 0-99
Track number. It's literally the track number, valid 0-99. Iconic. β
π·οΈ type
$track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK
Type of track. It's either SDL_AUDIO_TRACK or SDL_DATA_TRACK. Simple as that. π
π length
$track->length()
Length, in frames, of this track. Frames, bestie β not minutes, frames. Frames. π
π offset
$track->offset()
Frame offset to the beginning of this track. It's the frame offset, periodt. No cap. π
π SEE ALSO π
Go check out SDL::CDROM and SDL::CD β they're linked in the original, and they're iconic. π¦
π AUTHORS π
See "AUTHORS" in SDL. That's the whole author tea. π«Ά
Signed, sealed, delivered by perl v5.42.0 on 2024-05-01 β page pods::...DTrack(3pm). That's the footer, bestie. π
π
π¦ where this page comes from
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms