X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fevoral%2Fsrc%2Flibsmf%2Fsmf.h;h=cbc7035f91d284575e74d0896a20f39f7100d2e5;hb=202788ea18ddff1754da0b77d1d77ca6ef6fbca1;hp=212105c5d06bc7a94a830e428254e9da3b02bfce;hpb=ce7a5e1c9fa3edf2d9cc66875505e402a0aaa6f6;p=ardour.git diff --git a/libs/evoral/src/libsmf/smf.h b/libs/evoral/src/libsmf/smf.h index 212105c5d0..cbc7035f91 100644 --- a/libs/evoral/src/libsmf/smf.h +++ b/libs/evoral/src/libsmf/smf.h @@ -33,7 +33,7 @@ /** * - * \mainpage libsmf - general usage instructions + * \page libsmf libsmf - general usage instructions * * An smf_t structure represents a "song". Every valid smf contains one or more tracks. * Tracks contain zero or more events. Libsmf doesn't care about actual MIDI data, as long @@ -386,12 +386,18 @@ int smf_event_is_textual(const smf_event_t *event) WARN_UNUSED_RESULT; char *smf_event_decode(const smf_event_t *event) WARN_UNUSED_RESULT; char *smf_event_extract_text(const smf_event_t *event) WARN_UNUSED_RESULT; +/* Routines for dealing with Variable Length Quantities (VLQ's). + Slightly odd names reflect original static names within libsmf + */ +int smf_format_vlq (unsigned char *buf, int length, unsigned long value); +int smf_extract_vlq(const unsigned char *buf, const size_t buffer_length, uint32_t *value, uint32_t *len); + /* Routines for loading SMF files. */ -smf_t *smf_load(const char *file_name) WARN_UNUSED_RESULT; +smf_t *smf_load(FILE *) WARN_UNUSED_RESULT; smf_t *smf_load_from_memory(const void *buffer, const size_t buffer_length) WARN_UNUSED_RESULT; /* Routine for writing SMF files. */ -int smf_save(smf_t *smf, const char *file_name) WARN_UNUSED_RESULT; +int smf_save(smf_t *smf, FILE *file) WARN_UNUSED_RESULT; /* Routines for manipulating smf_tempo_t. */ smf_tempo_t *smf_get_tempo_by_pulses(const smf_t *smf, size_t pulses) WARN_UNUSED_RESULT;