MusHandleSetReverb()

Syntax

int MusHandleSetReverb(musHandle handle, int reverb);

Arguments

handle
the sound handle
reverb
the reverb offset

Description

It sets the reverb offset value for the channels associated with the specified sound handle. The reverb offset is used as a base value for the reverb settings defined in the sound data, and the sound data's settings are scaled based on the remaining possible settings (128 - reverb).

The handle must be a sound handle returned by MusStartSong(), MusStartSongFromMarker(), MusStartEffect(), or MusStartEffect2(). If a handle of zero is supplied, this function will always return zero.

The reverb value should be within the range of 0 to 0x7F (127). The default reverb offset for all channels is 0. This value is used in the following manner to calculate the channel's reverb level:

   channelreverb = reverb+(((128-reverb)*datareverb)>>7)

Return Value

Number of channels which have been changed.

Example

void ReverbFromDepth(unsigned long handle, int depth)
{
  /* depth in range 0-32767 */
  MusHandleSetReverb(handle, depth>>8);
}

See Also

MusStartSong(), MusStartEffect(), MusStartEffect2()