Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

[bug] Cannot add "Dissonance Echo Cancellation" on Linux x64 using the Editor #228

Closed jespersmith closed 3 years ago

jespersmith commented 3 years ago

Context

I want to setup AEC on Linux. I was not able to apply the Dissonance Echo Cancellation filter to the mixer. I opened the project on Windows and added the effect there. Reloading the project in Linux gives me the following error

Effect Dissonance Echo Cancellation could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly.

I tried the workarounds for Android as described here: https://github.com/Placeholder-Software/Dissonance/issues/110, none of them seemed to work.

Expected Behavior

Echo Cancellation is loaded

Actual Behavior

Echo cancellation does not load

Fix

Steps to Reproduce

  1. Create mixer under Linux with the editor
  2. Try to add Dissonance Echo Cancellation effect
  3. It is not there

Other way

  1. Create mixer with Dissonance Echo Cancellation effect on Windows
  2. Load the project in Linux x64 Editor
  3. Get an error the effect could not be found

Your Environment

jespersmith commented 3 years ago

Note that this plugin seems to work: https://github.com/keijiro/MinimumAudioPlugin

Looking at the compiled libraries, it looks like the UnityGetAudioEffectDefinitions function is local to the library instead of global export and in the dynamic symbol table.

nm libAudioPluginDissonance.so | grep UnityGetAudio
0000000000070ae0 t UnityGetAudioEffectDefinitions

Note the small "t", which means local visibility. On the MinimumAudioPlugin, I get

nm libSinOsc.so 
0000000000001460 T UnityGetAudioEffectDefinitions

Note the capital T, or global visiblity.

Here are some options how to recompile and fix it: https://stackoverflow.com/a/37534357

martindevans commented 3 years ago

Note: Discussed briefly on Discord. Jesper will recompile to expose the necessary symbols.

martindevans commented 3 years ago

Dissonance 8.0.0 has just released on the asset store with new Linux binaries which should resolve this issue. I'll close this issue for now, don't hesitate to comment here if there's still an issue :)