SoundCreate(3)

πŸ“¦ version 1.9.5, in fedora 43, fedora 44

✨ SoundCreate ✨

okay so bestie, you found a page from the Library Functions Manual β€” it's SoundCreate(3), and it's literally the glow-up moment where an audio file gets its whole identity πŸ’–


🌸 Name 🌸

SoundCreate β€” create a description of an audio file. that's it, that's the job, and she ate πŸ’…


πŸŽ€ Synopsis πŸŽ€

#include <audio/audiolib.h>

Sound SoundCreate(file_format, data_format, num_tracks, sample_rate,
num_samples, comment)
    int file_format;
    int data_format;
    int num_tracks;
    int sample_rate;
    int num_samples;
    char *comment;

πŸ¦‹ Arguments πŸ¦‹

  • file_format β€” which flavour of audio file you want, bestie. currently the supported ones are: SoundFileFormatSnd, SoundFileFormatVoc, SoundFileFormatWave, SoundFileFormatAiff, and SoundFileFormatSvx. pick your fighter ✨
  • data_format β€” the format of the actual audio data itself. currently the defined ones are: AuFormatULAW8, AuFormatLinearUnsigned8, AuFormatLinearSigned8, AuFormatLinearSigned16MSB, AuFormatLinearUnsigned16MSB, AuFormatSignedLinear16LSB, and AuFormatLinearUnsigned16LSB. yes there are seven. no we are not skipping any πŸ™ˆ
  • num_tracks β€” how many tracks are in the audio data. the track count. the multitrack situation 🎧
  • sample_rate β€” the sample rate of the audio data. iconic number, very important πŸ”₯
  • num_samples β€” how many samples are in the audio data. not the rate, the actual count. different thing, don't mix them up πŸ’€
  • comment β€” ngl the page itself just says comment and then dips, like no description at all 😭 so that's all we're working with here, bestie

🌈 Description 🌈

SoundCreate creates a SoundRec structure, initializes it with the values you specified, and returns a Sound β€” which is a pointer to that SoundRec structure 🫢

and if something went wrong? it returns NULL. that's the vibe check failing. no cap ⭐


πŸ‘‘ See Also πŸ‘‘

  • SoundCloseFile
  • SoundOpenFileForReading
  • SoundOpenFileWriting

and also:

  • audiolib β€” Network Audio System C Language Interface 🧚

and that's the whole page, bestie!! this lil legend is version 1.9.5, it lives under the name SoundCreate(3), and it was born to run in the Library Functions Manual β€” so go forth and create some audio file descriptions, you absolute main character πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from