function continuePlaying(entity, sound) {
    if (!entity.getData("fiskheroes:speeding")) {
        return false;
    }
    
    var vel = entity.motion().length();
    var ticks = sound.ticksPlaying();
    var volume = -0.1;
    
    if (vel >= 0.0) {
        volume += 5.0 * Math.min(Math.max(vel * vel / 1, 0), 1);
    }
    
    if (ticks < 90) {
        volume *= ticks / 90;
    }
    else {
        sound.setPitch(1);
    }
    
    sound.setVolume(volume * 1.0);
    return true;
}
