Sound_AudioInfo(3)

πŸ“¦
version 1.0.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

Sound_AudioInfo β€” literally the whole vibe report on what format an existing sample is in πŸŽ€

So yeah bestie, this is Sound_AudioInfo(3) from the Library Functions Manual, and it's here to tell you everything about a sample's format. Buckle up πŸ¦‹


✨ SYNOPSIS ✨

First things first, you gotta pull in the header, no cap:

#include <SDL_sound.h>

🌸 Data Fields 🌸

Here's the little squad of fields it's carrying around, and yes we're listing every single one πŸ’…

  • Uint16 format β€” the data format, obviously
  • Uint8 channels β€” how many channels we're working with
  • Uint32 rate β€” the sample rate, the goods

πŸ”₯ Detailed Description πŸ”₯

Okay so this struct is information about an existing sample's format. That's it, that's the whole job πŸ‘‘

These are genuinely the basics of a decoded sample's data structure, fr fr:

  • the data format β€” see AUDIO_U8 and friends over in SDL_audio.h (iykyk)
  • the number of channels
  • the sample rate

And like… if you need more explanation than that?? You should stop developing sound code right now. 😭 Not even joking, that's straight from the source. Put the compiler down, go touch grass 🌱

See also πŸ‘€

  • Sound_SampleNew
  • Sound_SampleNewFromFile

🧚 Field Documentation 🧚

πŸŽ€ Uint8 Sound_AudioInfo::channels

Number of sound channels, bestie. 1 == mono, 2 == stereo. That's the whole math πŸ’«

πŸ¦‹ Uint16 Sound_AudioInfo::format

It's the equivalent of SDL_AudioSpec.format. Same energy, different struct ⭐

🌈 Uint32 Sound_AudioInfo::rate

Sample rate β€” aka the frequency of sample points per second. She's ticking away, keeping time, main character energy β±οΈπŸ’œ


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for SDL_sound from the source code. So nobody actually wrote this by hand, the robot did it πŸ™ˆπŸ’€


And that's the whole page, no crumbs left behind πŸ“ Signing off with the deets: this was SDL_sound, Version 1.0.1, living its life on the SDL_sound manual page β€” Sound_AudioInfo(3). Slay, stay decoded, and hydrate πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from