SDL_CDtrack(3)

SDL_CDtrack πŸ’Ώβœ¨

okay bestie, welcome to the SDL API Reference, and today's main character is SDL_CDtrack β€” literally the lil struct that holds the tea on every single track on a CD. yes, the whole manual name is SDL API Reference, we're in the official docs, act like it πŸ’…


🌸 NAME 🌸

SDL_CDtrack β€” CD Track Information Structure

like, it's a structure. it tracks info. about tracks. iconic behavior tbh.


πŸŽ€ STRUCTURE DEFINITION πŸŽ€

typedef struct{
  Uint8 id;
  Uint8 type;
  Uint32 length;
  Uint32 offset;
} SDL_CDtrack;

copy that exactly, do not freestyle it, i am begging 🫢


πŸ’– STRUCTURE DATA πŸ’–

okay so here's what's inside this little guy:

  • id β€” the track number, ranging from 0-99. that's it. that's the id.
  • type β€” either SDL_AUDIO_TRACK or SDL_DATA_TRACK. vibe check: is it music or is it data?
  • length β€” how long this track is, measured in frames. frames, bestie, not seconds. we'll get there.
  • offset β€” the frame offset pointing to the very beginning of this track. like, where it starts.

πŸ¦‹ DESCRIPTION πŸ¦‹

SDL_CDtrack stores data on each track on a CD, and ngl its fields should be pretty self explainatory. it's a member of the SDL_CD structure, so it does not roll alone β€” it's part of the squad πŸ‘‘

Note: 🚨 Frames can be converted to standard timings. There are CD_FPS frames per second, so SDL_CDtrack.length/CD_FPS=length_in_seconds. math is mathing, that's the conversion, use it πŸ’€

🌈 SEE ALSO 🌈

  • SDL_CD

k that's the whole page, no notes, you ate this. this was the SDL page, last touched Tue 11 Sep 2001, 22:59 (yes, 2001, we're reading historical documents fr fr) β€” mwah, go read SDL_CD next, love u bye πŸ’œπŸŽ€

πŸ“¦ where this page comes from