MD_MIDIFile Standard MIDI File Processing 2.6
Library to play Standard MIDI Files (SMF)
|
Header file for helper functions definitions. More...
Functions | |
uint32_t | readMultiByte (SDFILE *f, uint8_t nLen) |
uint32_t | readVarLen (SDFILE *f) |
void | dumpBuffer (uint8_t *p, int len) |
Header file for helper functions definitions.
void dumpBuffer | ( | uint8_t * | p, |
int | len | ||
) |
Dump a block of data stream
During debugging, this method provides a formatted dump of data to the debug output stream.
The DUMP_DATA macro define must be set to 1 to enable this method.
p | pointer to the data buffer. |
len | size of the data buffer. |
uint32_t readMultiByte | ( | SDFILE * | f, |
uint8_t | nLen | ||
) |
Read a multi byte value from the input stream
SMF contain numbers that are fixed length. This function reads these from the input file.
*f | pointer to SDFile object to use for reading. |
nLen | one of MB_LONG, MB_TRYTE, MB_WORD, MB_BYTE to specify the number of bytes to read. |
uint32_t readVarLen | ( | SDFILE * | f | ) |
Read a variable length parameter from the input stream
SMF contain numbers that are variable length, with the last byte of the number identified with bit 7 set. This function reads these from the input file.
*f | pointer to SDFile object to use for reading. |