1register_sample_file_type(3)    Allegro manual    register_sample_file_type(3)
2
3
4

NAME

6       register_sample_file_type - Registers custom loading/saving sample rou‐
7       tines. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void register_sample_file_type(const char *ext,  SAMPLE  *(*load)(const
14       char *filename), int (*save)(const char *filename, SAMPLE *spl));
15

DESCRIPTION

17       Informs the load_sample() function of a new sample file type, providing
18       routines to read and write samples in this format (either function  may
19       be NULL). Example:
20
21          SAMPLE *load_mp3(const char *filename)
22          {
23             ...
24          }
25
26             register_sample_file_type("mp3", load_mp3, NULL);
27
28

SEE ALSO

30       load_sample(3), save_sample(3)
31
32
33
34Allegro                          version 4.4.3    register_sample_file_type(3)
Impressum