Best way to set audio sliders with sound class

Hi,
When setting my audio slider to 0 and then increasing the audio again, it no longer plays.

I know that setting this per sound wave will do the trick but this would be pretty time consuming altering each individually

There is also this workaround of setting a min value to something really small like 0.001, that way it never really mutes.

Are there any best practices for this type of thing?

Best practice is setting the virtualization option to “play when silent” I believe it was, which you already mentioned, on each sound file. I don’t know of another way. If there’s any it might be an option on an UAudioComponent or sound class I don’t know of.

Perhaps you could use the property matrix to update the property on all files at once.

1 Like

Thanks, for you response. Yes you are right about the bulk edit matrix, do you by chance know of the uses for the disabled and restart options? It’s set to restart by default but when I set the audio to zero then dial it back up, the audio does not ‘restart’ from the beggining which is what I assume the option does. Is this a bug or am I misunderstading something.

I haven’t used many of those options. Scanning for “virtualization” on the docs gets me nowhere but the doc page for the virtualization enum shows some options only work for sound files playing in a loop.

VirtualizationMode | Unreal Engine Documentation

The only source files in the engine mentioning VirtualizationMode::Restart are ActiveSound.cpp and SoundBase.cpp

If you look at FAudioVirtualLoop::Virtualize you will see this method returns if the sound is virtualizationMode::Disabled or if it’s not looping, never reaching FActiveSound::CreateVirtualCopy which processes the restart property.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.