int MusHandleSetTempo(musHandle handle, int tempo);
It sets the tempo scale value for the channels associated with the specified sound handle. This function allows the programmer to speed up or slow down songs and sound effects relevant to the defined song speed or the default sound effect speed.
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 tempo should be within the range of 0 to 0x100 (256), with this range representing 0% to 200% of the value defined in the original sound data. The default tempo scale value for all channels is 0x80 (100%).
Number of channels which have been changed.
void SongSpeedFromBossHealth(unsigned long handle, int health) { /* health In range 0-32767 */ health = (32767 - health)>>9; MusHandleSetTempo(handle, health + 128); }