MidiPlay

BOOL WINAPI MidiPlay
(
	HANDLE hSequence
);

This function makes a sequence to play.

Parameters

Return values

TRUE if the sequence started to play or FALSE if not. The most likely reason for an error is an invalid handle.

Remarks

The sequence must have been opened with MidiOpen or created with MidiCreate before to be played. Use MidiPause and MidiStop to control playback. Use MidiSet with MIDI_LOOP to make the sequence to loop.

Example

HANDLE Sequence;

// Open the sequence
MidiOpen("test1.mid", DEFAULT_DEVICE, &Sequence);

// Turn looping on
MidiSet(Sequence, MIDI_LOOP, TRUE);

// Play the sequence
MidiPlay(Sequence);

Further information

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: breno_sarmento@hotmail.com
ICQ: 78977999 ()