To provide some context for this issue, I have a main menu and several levels which I can load from this menu.
My game also has background music, voice and sound effects. Their volumes can be changed in an options menu.
This is a purely blueprint-based project and no C++ is used. I am currently using the latest version, UE 4.14.
When loading a level from the main menu (both PIE and packaged game) and then immediately quitting back to the main menu after it has loaded, the music (which plays in the menu background) no longer works. When going back into a level again, I find that the music (and some of the voices / sound effects) no longer work in the level either.
I use sound mix modifiers to change the global audio volumes of the music/voice/effects sounds, and these are applied every time a level is loaded (including the main menu). Here is what I have investigated/tried:
- I have checked the logs, and after a thorough search for everything related to audio and sound, I have found no errors or warnings, or indeed anything relating to global audio settings other than recognising my hardware.
- I have used print statements to check the volume multiplier of the sound components producing the music and this remains at 1.0 (as it should).
- I have used print statements to check what float is being fed into the ‘volume’ input for the ‘set sound mix class override’ node (which is followed by ‘push sound mix modifier’) and this shows the correct float value (i.e. not 0.0).
- I have used ‘clear sound mix modifiers’ and ‘clear sound mix class override’ (the latter affecting the music class). This does not fix the issue.
- I have forced the audio to start playing after a delay of 0.5 seconds after level load. This does nothing, but a print statement displays ‘true’ when reading the value of ‘IsPlaying’ from the audio component (i.e. it is playing but no sound is produced). Also activating the component does not fix the issue as it appears to be activated already.
- I have tried recording audio directly from the stereo mix device through the audacity software to see if it was my headset, and it too recorded no audio when my headset played no audio.
- I have tried changing when sound mix modifiers are pushed, such that only the main menu level triggers the modifiers on ‘event begin play’ (i.e. the modifiers are not pushed as soon as a level other than the main menu is loaded).
Exiting the PIE mode and restarting in PIE resets everything, meaning the audio works again, however the same process happens when repeating the steps outlined on the 2nd paragraph. Exiting my packaged game and restarting also fixes everything, however the same applies.
Does anyone know what could be causing this, or indeed if it is a bug?
Thanks for your time,
Xarastoph