1save_sample(3) Allegro manual save_sample(3)
2
3
4
6 save_sample - Writes a sample into a file. Allegro game programming
7 library.
8
10 #include <allegro.h>
11
12
13 int save_sample(const char *filename, SAMPLE *spl);
14
16 Writes a sample into a file. The output format is determined from the
17 filename extension. At present Allegro does not natively support the
18 writing of any sample formats, so you must register a custom saver rou‐
19 tine with register_sample_file_type(). Example:
20
21 if (save_sample("sound.wav", sample) != 0)
22 abort_on_error("Couldn't save sample!");
23
25 Returns zero on success, non-zero otherwise.
26
27
29 load_sample(3), register_sample_file_type(3)
30
31
32
33Allegro version 4.4.2 save_sample(3)