Media Sound Wave not playing while player re-enter the sound area

I’m using the Media Framework 2.0 to play some sound of video.

It works fine when Media Player start. (Playing sound at some location with attenuation). Then I leaves the fallout area, the sound stops correctly.

But when I re-enter the sound area, the sound never come back. Am I doing something wrong?

Any ideas would be appreciated!

Starting with 4.13, we’re stopping sounds when they reach zero volume. It was too expensive to have them all running. Zero volume sounds are now opt-in. You can enable it with an option on the (Media-)SoundWave assets… it’s called bVirtualizeWhenSilent or something like that.

Thanks for replying.

I’m using C++ and I find code in class SoundWave:

/** Allows sound to play at 0 volume, otherwise will stop the sound when the sound is silent. */
UPROPERTY(EditAnywhere, Category=Sound)
uint32 bVirtualizeWhenSilent:1;

However, this variable is private so it seems I have no chance to modify it. Could you tell me how to set this variable to true?.

I found that I can set bVirtualizeWhenSilent directly in the code. But even when I set bVirtualizeWhenSilent to true, sounds not come back when I re-enter the sound area.

I debug the code and find the only place using bVirtualizeWhenSilent is

if (WaveInstance->GetVolume() > KINDA_SMALL_NUMBER || (bVirtualizeWhenSilent && AudioDevice->VirtualSoundsEnabled()))
{
    WaveInstances.Add(WaveInstance);
}

And it seems AudioDevice->VirtualSoundsEnabled() always return false. Is there any way to make it true?

Btw, I’m using SpawnSoundAttached to play the media sound wave.

Thanks a lot.

I got the way to modify Default Audio Settings.

For someone who may meet the same situation, here is the way to make (Media-)SoundWave “virtual” play when it’s silent:

  1. set bVirtualizeWhenSilent to true.
  2. In “Project Settings” → “Engine” → “Audio” → “Quality”, check “Allow Virtualized Sounds”.

This doesn’t work for me.

With Allow Virtualized Sounds not checked, the sound starts playing when I enter the radius, but from the beginning instead of current video location.

With it checked, the sound doesn’t play at all when I enter the attenuation radius.

Our audio programmer is currently on vacation. I think we’ll have to make an adjustment to procedural sound waves in 4.15 for this to work properly.

Ok…I have to say I’m disappointed that this was ever considered something you could just turn off. Walking away from a sound (that is synced with video) and turning it off makes no sense, because when you start the sound again you’ll have lost audio sync.

I guess you could try and play the sound at the right spot by getting the current location of the playing video and then trying to start the audio from that spot. Not sure if that would work, I haven’t tried it.

For anyone struggling with this, the work around we found was to set a custom attenuation curve on an audio cue that never goes to zero. Our curve goes from 1 to 0.01 and the sound stays on (although not audible).

So is there any way to fix this without C++. It is ridiculously annoying. I’ve got a VR level where you can walk up to a playing movie screen and walk away. Whenever you come back there’s no sound.

This still seems to be occurring. Has anyone opened up an issue for this yet? I’d like to upvote it.

[4.22] If anyone is looking at this chain now, the option is called “play when silent” and it’s directly on the sound wave asset.

1 Like