DS GBA
mmEffectRate

Back to Index

Prototype

void mmEffectRate( mm_sfxhand handle, mm_word rate );

Parameters

handle

Sound effect handle received from mmEffect/mmEffectEx

rate

New playback rate. The actual playback rate depends on this value and the base frequency of the sample. This parameter is a 6.10 fixed point value, passing 1024 will return the sound to its original pitch, 2048 will raise the pitch by one octave, and 512 will lower the pitch by an octave. To calculate a value from semitones: Rate = 1024 * 2^(Semitones/12). (please don't try to do that with integer maths)

Description

Changes the playback rate for a sound effect.

See Also

mmEffect, mmEffectVolume, mmEffectPanning, mmEffectScaleRate