Sound(3)

πŸ’– Sound(3) β€” bestie's guide to the Sound thingy πŸ’–

library functions manual Β· audio file description Β· ok so sit down, grab a boba, we're learning Sound(3) πŸ§‹βœ¨


🌸 Name 🌸

Sound β€” it's an audio file description. That's the whole vibe. πŸ’…


πŸŽ€ Structures πŸŽ€

First thing first, you gotta pull in the headers, no cap:

#include <audio/audiolib.h>
#include <audio/sound.h>

typedef struct
{
    . . .
}SoundRec, *Sound;

So like, SoundRec is the struct and Sound is a pointer to it. Iconic duo honestly 🫢


✨ Members ✨

🚨 GIRLIE STOP. Do not dereference the members of the SoundRec structure directly. That's not the move. Use the access macros instead. Trust. πŸ™ˆ

And btw, sound is a Sound, which is a pointer to a SoundRec structure. That's the lore. πŸ‘‘

  • SoundFileFormat(sound) β€” gives you the int value that's the format of the sound file. πŸ”₯
  • SoundFileFormatString(sound) β€” gives you the string description of the format of the sound file. Like the format but make it ✨words✨
  • SoundDataFormat(sound) β€” gives you the int value that's the data format of the sound file.
  • SoundDataFormatString(sound) β€” gives you the string description of the data format of the sound file. πŸ¦‹
  • SoundNumTracks(sound) β€” gives you the int value that's the number of tracks in the audio data in the sound file. (how many tracks bestie?? the people wanna know)
  • SoundSampleRate(sound) β€” gives you the int value that's the samples rate of the audio data in the sound file. 🎧
  • SoundNumSamples(sound) β€” gives you the int value that's the total number of samples. all of them. every single one. πŸ’€
  • SoundComment(sound) β€” gives you the string comment. πŸ“
  • SoundBytesPerSample(sound) β€” returns the bytes per sample of audio data. πŸ“
  • SoundNumBytes(sound) β€” returns the total number of bytes of audio data in the sound file. big number energy.
  • SoundValidateDataFormat(sound) β€” returns true if the sound file format is a valid format. a vibe check, but for formats. βœ…

πŸ’œ Description πŸ’œ

The SoundRec structure describes an audio file. That's it, that's the whole thing, that's the moment. 🌈⭐


🌟 See Also 🌟

Go read these next, bestie, they're all part of the same friend group:

  • SoundCloseFile
  • SoundCreate
  • SoundFlushFile
  • SoundOpenFileForReading
  • SoundOpenFileWriting
  • SoundReadFile
  • SoundRewindFile
  • SoundSeekFile
  • SoundTellFile
  • SoundWriteFile

And of course the main character: audiolib β€” Network Audio System C Language Interface πŸ’–


ok that's the whole page, mwah πŸ’‹ this was the sound package, version 1.9.4, and the page itself is Sound(3) β€” go slay some audio files bestie, ily, bye πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from