pods::...DTrack(3pm)

πŸ“¦ version 2.548, in opensuse-leap 16.0

πŸ’Ώ 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_TRACK
  • SDL_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