ardour
Classes | Macros | Functions | Variables
smf_private.h File Reference
#include <stdint.h>
#include <sys/types.h>

Go to the source code of this file.

Classes

struct  chunk_header_struct
 
struct  mthd_chunk_struct
 

Macros

#define ATTRIBUTE_PACKED
 

Functions

void smf_track_add_event (smf_track_t *track, smf_event_t *event)
 
void smf_init_tempo (smf_t *smf)
 
void smf_fini_tempo (smf_t *smf)
 
void smf_create_tempo_map_and_compute_seconds (smf_t *smf)
 
void maybe_add_to_tempo_map (smf_event_t *event)
 
void remove_last_tempo_with_pulses (smf_t *smf, size_t pulses)
 
int smf_event_is_tempo_change_or_time_signature (const smf_event_t *event) WARN_UNUSED_RESULT
 
int smf_event_length_is_valid (const smf_event_t *event) WARN_UNUSED_RESULT
 
int is_status_byte (const unsigned char status) WARN_UNUSED_RESULT
 
smf_track_tsmf_find_track_with_next_event (smf_t *smf)
 

Variables

struct chunk_header_struct ATTRIBUTE_PACKED
 

Detailed Description

Private header. Applications using libsmf should use smf.h.

Definition in file smf_private.h.

Macro Definition Documentation

struct mthd_chunk_struct ATTRIBUTE_PACKED

Definition at line 47 of file smf_private.h.

Function Documentation

int is_status_byte ( const unsigned char  status)

Returns 1 if the given byte is a valid status byte, 0 otherwise.

Definition at line 248 of file smf_load.c.

void maybe_add_to_tempo_map ( smf_event_t event)

Definition at line 125 of file smf_tempo.c.

void remove_last_tempo_with_pulses ( smf_t smf,
size_t  pulses 
)

Definition at line 173 of file smf_tempo.c.

void smf_create_tempo_map_and_compute_seconds ( smf_t smf)

Definition at line 235 of file smf_tempo.c.

int smf_event_is_tempo_change_or_time_signature ( const smf_event_t event)
Returns
Nonzero if event is Tempo Change or Time Signature metaevent.

Definition at line 639 of file smf.c.

int smf_event_length_is_valid ( const smf_event_t event)
Returns
Nonzero, if event is as long as it should be, from the MIDI specification point of view. Does not work for SysExes - it doesn't recognize internal structure of SysEx.

Definition at line 740 of file smf_load.c.

smf_track_t* smf_find_track_with_next_event ( smf_t smf)

Searches for track that contains next event, in time order. In other words, returns the track that contains event that should be played next.

Returns
Track with next event or NULL, if there are no events left.

Definition at line 816 of file smf.c.

void smf_fini_tempo ( smf_t smf)

Definition at line 339 of file smf_tempo.c.

void smf_init_tempo ( smf_t smf)

Definition at line 364 of file smf_tempo.c.

void smf_track_add_event ( smf_track_t track,
smf_event_t event 
)

Adds the event to the track and computes ->delta_pulses. Note that it is faster to append events to the end of the track than to insert them in the middle. Usually you want to use smf_track_add_event_seconds or smf_track_add_event_pulses instead of this one. Event needs to have ->time_pulses and ->time_seconds already set. If you try to add event after an EOT, EOT event will be automatically deleted.

Definition at line 449 of file smf.c.

Variable Documentation

struct mthd_chunk_struct ATTRIBUTE_PACKED