resonance-audio / resonance-audio-unreal-sdk

Resonance Audio SDK for Unreal
https://resonance-audio.github.io/resonance-audio/develop/unreal/getting-started
Other
15 stars 4 forks source link

Resonance Audio effects do not work in game packaged for Windows #6

Open arjony opened 5 years ago

arjony commented 5 years ago

I have a project with room effects and Ambisonics sound files played with Resonance Audio. It works well when I play it in the editor, but when I package it for Windows no Resonance Audio effects work. The binaural synthesis does not work, instead the sources are just panned left/right. No room effects are added. The Ambisonics sound files are played, but the sound field is not rotated depending on the player orientation. I don't get any error messages, the game runs properly, all sounds are played, but without any Resonance Audio effects. Any suggestions about what's wrong?

I use UE4.21, but I have the same issue with UE4.19

mgorzel commented 5 years ago

Hi @arjony, do you still have issues with that? If so, could you share a minimal project that would help reproduce? Sounds like the it could be using a legacy audio engine, have you checked the config files? Also, are you building on Windows too?

arjony commented 4 years ago

Hi @mgorzel

Sorry for not replying. The project has been paused for a while, but now we are starting it up again. I have now moved over to UE 4.23, but have the same issue. It works well in the editor if I run in the selected viewport or in a new editor window. If I run it as a standalone game through the editor or if I package the project for Windows the Resonance Audio effects stop working. The sounds play, but no room effects or spatialization works. Yes, I'm building on Windows.

Do you have any suggestions on what might be wrong? Do I have to copy any dll files manually to the packaged game? Anything else you know of? Does it work for you?

I have set up a simple test in the 1st Person Template. Just one audio volume with a Resonance Audio reverb and one sound source. I have the same issue. It works in the editor, but not when I package the project. If you can get such a simple project working, maybe you can guide me through the steps?

arjony commented 4 years ago

Seems like I have sorted this out now. If I create a shortcut to the exe file of the packaged game and add the suffix -audiomixer (in the same way as the audiomixer is activated for the UE editor), the sounds in the game work properly. I don't know if there is another way of activating the audiomixer for packaged games.

rjregner commented 4 years ago

@arjony

Go to your Engine\Config\Windows\WindowsEngine.ini

Quick change is needed. It should look like this below so that the settings from the engine are applied to the package.

[Audio] ;AudioDeviceModuleName=XAudio2 ; Uncomment below (and comment above) to use multi-platform mixer module by default AudioDeviceModuleName=AudioMixerXAudio2