Closed nieman1234 closed 3 years ago
This is a mistake on my part when setting up the AudioPluginDissonanceNative
class - the new RNN noise removal system isn't tested on the magic leap and isn't intended to be used on that platform (the ML has quite a lot of it's own mic preprocessing, so the extra cost of RNNoise on top of that probably isn't worth it).
In Assets/Plugins/Dissonance/Core/Audio/Capture/AudioPluginDissonanceNative.cs
on line 27 find this line:
#if UNITY_EDITOR_WIN || (UNITY_STANDALONE_WIN && !UNITY_WSA) || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX || UNITY_ANDROID || UNITY_LUMIN
and remove UNITY_LUMIN
from the end. This will disable the RNNoise removal system for Lumin and prevent the error form happening.
Thank you so much I was able to test this during the week, but I'm still having issues with the Magic Leap version of the plugin.
On line 110 of AudioPluginDissonanceNative.cs
I had to add UNITY_LUMIN
when using the plugin from Assets/Plugins/Dissonance/Plugins/Android/libs/ARM64/libAudioPluginDissonance.so
Seems the Magic Leap plugin doesn't include Dissonance_SetAgcIsOutputMutedState
and when I leave UNITY_LUMIN
out of the platform directive on line 110 I get a compiler error with 'AudioPluginDissonanceNative.Dissonance_SetAgcIsOutputMutedState(IntPtr, bool)' is inaccessible due to its protection level
from Assets/Plugins/Dissonance/Core/Audio/Capture/WebRtcPreprocessingPipeline.cs(220,49)
I'm not sure what gives, but I do have a ML One for testing.
I'm able to get around this by using the Assets/Plugins/Dissonance/Plugins/Android/libs/ARM64/libAudioPluginDissonance.so
version of the plugin and adding UNITY_LUMIN
to line 110 in Assets/Plugins/Dissonance/Core/Audio/Capture/AudioPluginDissonanceNative.cs
Ah sorry, the Dissonance_SetAgcIsOutputMutedState
should be public (another mistake I made while setting up the AudioPluginDissonanceNative
class) - that's been fixed in the next version of Dissonance (probably coming next week).
Using the Android version of the plugin is also ok.
We kept the two separate because the ML does quite a lot of audio preprocessing before Dissonance has access to the audio, so it seemed likely that we might want to have a different audio processing system for ML audio. However, at the moment they're pretty much the same in the C++ code with just some differences in the C# code configuring it.
Thank you so much! I'm just going to keep running my workaround setup until that version releases. Loving the plugin btw!
Dissonance 8.0.2 was release a while ago which should fix this issue.
When I mark
Assets\Plugins\Dissonance\Plugins\Magic Leap\libAudioPluginDissonance.so
to be included in Magic Leap builds I get an error that I do not get when includingAssets/Plugins/Dissonance/Plugins/Android/libs/ARM64/libAudioPluginDissonance.so
instead.Documentation states to include
Assets\Plugins\Dissonance\Plugins\Magic Leap\libAudioPluginDissonance.so
for Magic Leap builds.When include the plugin from
Assets\Plugins\Dissonance\Plugins\Magic Leap\libAudioPluginDissonance.so
I get this error:Then the preprocessor buffer fills and app performance tanks.
I got around this issue by including
Assets/Plugins/Dissonance/Plugins/Android/libs/ARM64/libAudioPluginDissonance.so
instead ofAssets\Plugins\Dissonance\Plugins\Magic Leap\libAudioPluginDissonance.so
Using this work around Dissonance functions and more than one Magic Leap headset can communicate with each other via Dissonance.