SetSampleSpeed /Audio and multimedia

bool SetSampleSpeed(string fileName, float speed)

Sets the sample playback frequency scale. Some systems have software or hardware limitations that might cap the final frequency value. E.g: Android's lowest value allowed is 0.5f (sample playback lasts twice as long) and the highest value is 2.0f (playback is twice as short).

void onSceneCreated()
{
    LoadSoundEffect("soundfx/explosion.mp3");
}

void boom()
{
    // randomly varies frequency to avoid too repetitive sounds
    SetSampleSpeed("soundfx/explosion.mp3", randF(0.8f, 1.2f));
    PlaySample("soundfx/explosion.mp3");
}