MusSetSongFxChange()

Syntax

int MusSetSongFxChange(musBool onoff);

Arguments

onoff
the song FX change flag

Description

It enables or disables the processing of song commands that change the global audio library FX type. This allows the programmer to control the setting of the global audio library FX type that affects all sounds generated by the library from either songs or sound effects.

This function passes the FX change command (if the song FX change flag is being disabled) 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.

If onoff is set to MUSBOOL_ON, songs will be allowed to change the global audio library FX type. If onoff is set to MUSBOOL_OFF, songs will not be allowed to change the global audio library FX type and the previous settings will be restored. These will be either the last settings specified using the MusSetFxType() function, or AL_FX_BIGROOM if an FX type has never been specified.

Return Value

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

Example

musHandle StartTitleSong(void *addr)
{
  musHandle handle;

  MusSetSongFxChange(MUSBOOL_ON);
  handle = MusStartSong(void);
  return (handle);

}

void StopTitleSong(musHandle handle)
{
  MusHandleStop(handle, 10);
  while (MusHandleAsk(handle))
    CallNormalProcessing();
  MusSetSongFxChange(MUSBOOL_OFF);
}

See Also

MusSetFxType()