MusStop()

Syntax

void MusStop(unsigned long flags, int speed);

Arguments

flags
sound source type
speed
the number of video frames before channels are silenced

Description

It stops and silences the channels processing the specified sound source type. This function allows the programmer to stop all songs, all sound effects or both within the specified amount of time, which frees the channels associated with them.

The flags argument must contain MUSFLAG_SONGS, MUSFLAG_EFFECTS or both OR'ed together.

The speed value is the number of video frames before the channels will be stopped. Any positive integer is valid. A value of zero will stop the sound handle's channels immediately.

Return Value

None

Example

void SilenceAllSound(int frames)
{
  MusStop(MUSFLAG_SONGS|MUSFLAG_EFFECTS,frames);
  while (MusAsk(MUSFLAG_SONGS|MUSFLAG_EFFECTS))
    CallNormalProcessing();
}

See Also

MusAsk(), MusHandleStop()