save_sample(3alleg4)

✨ NAME ✨

okay so bestie, save_sample(3alleg4) β€” she's a function from the Allegro game programming library, and she writes a sample into a file. that's the whole gig. no cap. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

int save_sample(const char *filename, SAMPLE *spl);

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, writes a sample into a file. The output format is determined from the filename extension. periodt. πŸŽ€

At present Allegro does not natively support the writing of any sample formats, so you must register a custom saver routine with register_sample_file_type(). iykyk.

Example, bestie:

if (save_sample("sound.wav", sample) != 0)
   abort_on_error("Couldn't save sample!");

πŸ’… RETURN VALUE πŸ’…

Returns zero on success, non-zero otherwise. that's the vibe check: zero = slay, non-zero = not slay. 😭


🌈 SEE ALSO 🌈


and that's the whole manual page, bestie! πŸ’– this was save_sample(3alleg4) from Allegro version 4.4.3. mwah πŸ’‹ periodt.