BASS_MIDI_StreamGetMark
Retrieves a marker from a MIDI file stream.
BOOL BASS_MIDI_StreamGetMark( HSTREAM handle, DWORD type, DWORD index, BASS_MIDI_MARK *mark );
Parameters
handle | The MIDI stream to retrieve the marker from. | ||||||||||||||||||||||
type | The type of marker to retrieve, one of the following.
| ||||||||||||||||||||||
index | The marker to retrieve... 0 = the first. | ||||||||||||||||||||||
mark | Pointer to a structure to receive the marker details. |
Return value
If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_ILLTYPE | type in not valid. |
BASS_ERROR_ILLPARAM | index in not valid. |
Remarks
The markers are ordered chronologically, and by track number (lowest first) if multiple markers have the same position.Syncs can be used to be informed of when markers are encountered during playback.
If a lyric marker text begins with a / (slash) character, that means a new line should be started. If the text begins with a \ (backslash) character, the display should be cleared. Lyrics can sometimes be found in BASS_MIDI_MARK_TEXT instead of BASS_MIDI_MARK_LYRIC markers.
Example
List a MIDI stream's markers.BASS_MIDI_MARK mark; int a; for (a=0; BASS_MIDI_StreamGetMark(handle, BASS_MIDI_MARK_MARKER, a, &mark;); a++) printf("marker @ %d = %s\n", mark.pos, mark.text); // display marker position and text