MusHandleSetFreqOffset()

Syntax

int MusHandleSetFreqOffset(musHandle handle, float offset);

Arguments

handle
the sound handle
offset
the frequency offset

Description

It defines a frequency offset that is added to the frequency generated by the sound data, before the sound is generated, on the channels associated with the specified sound handle.

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 offset is a floating point value, with 1.0 being a semitone. A limited range of values should be applied using this function (dependant on sample rate). The default frequency offset value for all channels is 0.

Return Value

Number of channels to which the frequency offset has been applied.

Example

void SetEngineOffset(float offset)
{
  MusHandleSetFreqOffset(engine_handle, offset);
}

See Also

MusStartEffect(), MusStartEffect2()