Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Prevent engine from muting itself when minimized?

I've noticed that UE4 will mute all of its audio output when it doesn't have window focus. This poster found a way to get around this by altering the engine files, but I'd like to be able to change this functionality in a game or plugin, so the packaged executable will have audio when minimized. Is there any way to do this from a project's code?

The exact line in the engine that is causing this trouble is in FWindowsPlatformMisc::PumpMessages(), which is static and thus cannot be overridden from a custom FWindowsPlatformMisc subclass.

Product Version: Not Selected
more ▼

asked Nov 04 '14 at 09:34 PM in C++ Programming

avatar image

236 11 101 160

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

I've just recently added a config value to set the unfocused volume in CL#2341022, so you'll soon be able to add:


To your Project's DefaultEngine.ini file to achieve the same effect without setting the volume multiplier constantly. You'll know when you've got this update because I removed GVolumeMultiplier at the same time.

more ▼

answered Nov 06 '14 at 10:06 AM

avatar image cognimancer Nov 06 '14 at 06:25 PM

Great! That sounds very helpful.

avatar image REDVIL44 Nov 16 '18 at 06:54 AM

Thanks, adding this to DefaultEngine.ini worked for me: [Audio] UnfocusedVolumeMultiplier=1.0

(comments are locked)
10|2000 characters needed characters left

I've found a workaround for this problem. What I do is add a line to an FTickableGameObject, in the Tick() function so it's called constantly. This line is just:

 GVolumeMultiplier = 1.0f;

This overrides the engine's natural functionality, which sets GVolumeMultiplier to 0 if the window doesn't have focus. It's not a perfect solution; it may cause problems if other parts of the project try to edit GVolumeMultiplier (maybe like an options menu that adjusts the game volume), but it works for a simple case.

more ▼

answered Nov 06 '14 at 01:45 AM

avatar image

236 11 101 160

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question