MusSetFxType()

Syntax

int MusSetFxType(int fxtype);

Arguments

fxtype
the audio library FX type

Description

It sets the global audio library FX type.

This function passes the FX change command to the player via the FIFO buffer. If there is no space free in the FIFO buffer this command will be ignored. The FIFO buffer is emptied every time the player processes sound data.

The fxtype argument sets the audio library FX type from one of the following.

  AL_FX_NONE
  AL_FX_SMALLROOM
  AL_FX_BIGROOM (default value)
  AL_FX_CHORUS
  AL_FX_FLANGE
  AL_FX_ECHO

Return Value

Zero (0) if the FIFO command has been ignored, otherwise a none zero value.

Example

void SetFxType(int fxtype)
{
  static int last_fxtype;

  if (fxtype==last_fxtype)
    return;
  last_fxtype = fxtype;
  while (MusSetFxType(fxtype)==0);
}

void InitCavernLevel(void)
{
  ...
  SetFxType(AL_FX_ECHO);
  ...
}

See Also

MusSetSongFxChange()