/// <summary>Updates the sound component. Should be called every frame.</summary> /// <param name="timeElapsed">The time in seconds that elapsed since the last call to this function.</param> /// <param name="model">The sound model.</param> internal static void Update(double timeElapsed, SoundModels model) { if (model == SoundModels.Linear) { UpdateLinearModel(timeElapsed); } else { UpdateInverseModel(timeElapsed); } }
/// <summary>Updates the sound component. Should be called every frame.</summary> /// <param name="timeElapsed">The time in seconds that elapsed since the last call to this function.</param> /// <param name="model">The sound model.</param> internal static void Update(double timeElapsed, SoundModels model) { //The time elapsed is used to work out the clamp factor //If this is zero, or above 0.5, then this causes sounds bugs //TODO: This is a nasty hack. Store the previous clamp factor in these cases?? if (timeElapsed == 0.0 || timeElapsed > 0.5) { return; } if (model == SoundModels.Linear) { UpdateLinearModel(timeElapsed); } else { UpdateInverseModel(timeElapsed); } }