UDK Game audio stops when the game window loses focus

Can you control whether or not a UDK Game mutes when the game window loses focus? I’m digging around the engine files to see.

There is a function+variable for whether the game pauses or not:



/** Tells whether the game was paused due to lost focus */
var transient bool bLostFocusPaused;

/**
 *    Pauses or unpauses the game due to main window's focus being lost.
 *    @param Enable tells whether to enable or disable the pause state
 */
event OnLostFocusPause(bool bEnable)
{
  `log("honk honk");
    if ( bLostFocusPaused == bEnable )
        return;

    if ( WorldInfo.NetMode != NM_Client )
    {
        bLostFocusPaused = bEnable;
        PlayerOwner.SetPause(bEnable);
    }
}

but the audio still pauses no matter what. Any ideas?

1 Like