libsmf
smf_save.c File Reference

Standard MIDI File writer. More...

Go to the source code of this file.

Functions

smf_event_tsmf_event_new_textual (int type, const char *text)
 
int smf_event_is_eot (const smf_event_t *event)
 
int smf_save (smf_t *smf, const char *file_name)
 Writes the contents of SMF to the file given.
 

Detailed Description

Standard MIDI File writer.

Definition in file smf_save.c.

Function Documentation

◆ smf_event_is_eot()

int smf_event_is_eot ( const smf_event_t * event)
Returns
Nonzero, if event is End Of Track metaevent.

Definition at line 475 of file smf_save.c.

References smf_event_struct::midi_buffer, and smf_event_struct::midi_buffer_length.

◆ smf_event_new_textual()

smf_event_t * smf_event_new_textual ( int type,
const char * text )

◆ smf_save()

int smf_save ( smf_t * smf,
const char * file_name )

Writes the contents of SMF to the file given.

Parameters
smfSMF.
file_namePath to the file.
Returns
0, if saving was successfull.

Definition at line 620 of file smf_save.c.

References smf_struct::number_of_tracks, smf, smf_get_track_by_number(), and smf_rewind().