libsmf

- Main Page
- Data Structures
- Files

- File List
- Globals

Functions
smf_save.c File Reference

Standard MIDI File writer. More...

Go to the source code of this file.

## Functions
smf_event_t * | smf_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. More...

## Detailed Description

Standard MIDI File writer.

Definition in file smf_save.c.

## Function Documentation

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_t* smf_event_new_textual | ( | int | type,
|  | const char * | text
| ) |  |

Definition at line 193 of file smf_save.c.

References smf_event_struct::midi_buffer, smf_event_struct::midi_buffer_length, smf_event_delete(), and smf_event_new().

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

Writes the contents of SMF to the file given.

Parameters

  smf | SMF.
  file_name | Path 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_get_track_by_number(), and smf_rewind().