resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

Import failed? Unable to find libaudiopluginresonanceaudio (Soundfield) #12

Closed AlexGareauV10 closed 6 years ago

AlexGareauV10 commented 6 years ago

Hi! I'm trying to add Resonance to our Android and iOs Unity project (To use an soundfield). In the editor, the soundfield work well and is spatialized, but when I build on Android, the audio work but is not spatialized. When using android monitor, I got this warning: Unable to find libaudiopluginresonanceaudio and then Audio effect Resonance Audio Renderer could not be found.

I can confirm that I already set the project Audio to resonance (Spatializer Plugin and Ambisonic Decoder Plugin). Already tried to re-install the package. And I've got this error with a new project with only Resonance added with the demo scenes.

Does anyone else got this error?

I'm using Unity 2017.3.0f3, but have the same bug in 2017.2.0.f3.

anokta commented 6 years ago

Hi Alex,

Could you verify if this issue is observable in a new Unity project using the ResonanceAudioDemo scene? FYI, that warning is usually harmless, is given by Unity due to how they look up the plugin libraries.

In addition, could you clarify what steps you followed to re-install the package (assuming you're using v1.1.1)? We strongly recommend to remove all the plugin assets completely from an existing project before importing the new SDK to avoid potential file overwrite issues. More specifically, to update the SDK in an existing project:

  1. Close Unity.
  2. Go to your project folder in a file browser, and remove the $YOUR_PROJECT/Assets/ResonanceAudio folder.
  3. Open your project in Unity.
  4. Import the new SDK Unity package.
AlexGareauV10 commented 6 years ago

Thanks for the answer!

I tried with a new Unity project and the warning is still there. But I found out that the demo scene are now working.

But the soundfield still work inside the Editor, but not on the device. The sound is not spatialized on Android! Is there a know bug with ambisonic soundfield?

anokta commented 6 years ago

As mentioned, that warning is safe to ignore. We are not aware of any known issues for Ambisonic soundfield playback.

Here's a test case you can try out in a vanilla project (with Resonance Audio SDK), to verify that the scene setup is correct:

  1. Import a first-order Ambisonic soundfield file, that is in Ambix (ACN/SN3D) format. You can find example files here, namely noise_o1_ambix.wav and voice_o1_ambix.wav.
  2. Select the file in the Editor, and enable Ambisonic toggle in the Inspector panel, then Apply the import settings.
  3. Drag Assets/ResonanceAudio/Prefabs/ResonanceAudioSoundfield prefab into the scene to add a new Ambisonic soundfield source.
  4. Select the imported Ambisonic soundfield file as AudioSource's Clip in the Inspector of the ResonanceAudioSoundfield game object.
  5. Play the scene in the Editor (and/or on a device) with headphones, and you should hear the playback spatialized around the listener. Note that, the Ambisonic soundfield playback takes into account of the orientation of the AudioListener, as well as the orientation of the game object that the AudioSource is attached to.
AlexGareauV10 commented 6 years ago

The soundfield now work perfectly, but I had to test it with another scene because with the test scene of resonance, the camera movement on mobile did not seem to move the listener! That seemed to be the problem!

Thank you very much for the support!