FActiveSound::UpdateAdjustVolumeMultiplier -> CurrentAdjustVolumeMultiplier = 1.#INF0000

Hi,

My engine version : 4.8

I believe this issue occurs on 4.9 and master too, because there is no change in this code since 4.8.

The function from the topic in some circumstances can calculate wrong CurrentAdjustVolumeMultiplier value = 1.#INF0000
because there is possibility to divide by 0.

This line of code:

CurrentAdjustVolumeMultiplier += (TargetAdjustVolumeMultiplier - CurrentAdjustVolumeMultiplier) * DeltaTime / (TargetAdjustVolumeStopTime - PlaybackTime);

in my case for looped sound:

PlaybackTime = 3.10002732
TargetAdjustVolumeStopTime = 3.10002732

will give something divided by 0.f

I’ve changed this line of code:

if( PlaybackTime <= TargetAdjustVolumeStopTime )

to

if( PlaybackTime < TargetAdjustVolumeStopTime )

And it seems it solves dividing by 0 issue. What do you guys think about my solution?:slight_smile:

Regards

Hey ,

Thank you for catching this issue and applying a fix. In order to see this fix applied would you mind submitting a pull request via GitHub?

If you need instructions or help on how to submit a pull request please let me know.

Cheers,

Sure I can make a pull request.

If your MP4 file includes audio codec that is not accepted by your device or player you can use a professional MP4 video converter - iDealshare VideoGo to convert your MP4 file to your device or player supported one with supported audio codec. How to Solve 'MP4 Plays but No Sound' Issue?