logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

save_sample - Writes a sample into a file. Allegro game programming library.

Description

       Writes  a  sample  into  a  file. The output format is determined from the filename extension. 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(). Example:

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

Name

       save_sample - Writes a sample into a file. Allegro game programming library.

Return Value

       Returns zero on success, non-zero otherwise.

See Also

load_sample(3alleg4), register_sample_file_type(3alleg4)

Allegro                                           version 4.4.3                             save_sample(3alleg4)

Synopsis

#include<allegro.h>intsave_sample(constchar*filename,SAMPLE*spl);

See Also