BOOL WINAPI MidiRemoveTrack ( HANDLE hSequence, WORD wTrack );
This function removes the track in the specified position of a sequence.
TRUE
if a track was removed or FALSE
if not. The reasons for an error are an invalid sequence handle or an invalid track index.
The sequence must have been open by MidiOpen or created by MidiCreate before you remove tracks from it.
Valid track indexes range from zero to the track count less one. Indexes past that value cause the function to return FALSE
.
HANDLE Sequence; int i; WORD wTracks; // Opens a sequence MidiOpen("test1.mid", DEFAULT_DEVICE, &Sequence); // Number of tracks wTracks = MidiGet(Sequence, TRACK_COUNT); // Strips all tracks from it for (i = 0; i < wTracks; i++) MidiRemoveTrack(Sequence, 0); // Finishes MidiClose(Sequence);
Released in November 19th, 2003
Updated in April 29th, 2004
Property of Breno de Lima Sarmento
Home page: http://www27.brinkster.com/brels
E-mail: [email protected]
ICQ: 78977999 ()