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.
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms