MidiReset

BOOL WINAPI MidiReset
(
	HANDLE hSequence
);

This function stops all playing sounds from a sequence and returns to position zero. Use it when doing manual playback.

Parameters

Return values

TRUE if the sequence was reset or FALSE if not. The most likely reason for an error is an invalid sequence handle.

Remarks

If the sequence is playing, MidiReset will not stop it.

Example

HANDLE Sequence;
int Count;

MidiOpen("test1.mid", DEFAULT_DEVICE, &Sequence);
MidiPlay(Sequence);

// Loops three times
for (Count=0; Count<3; Count++)
{
	Sleep(3000);
	MidiReset(Sequence);
};

// Finishes
MidiClose(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 ()