Closed pjc0247 closed 6 years ago
Same issue on iOS
Hi pjc0247
re: Android - It looks like I totally messed up with the native dependencies with Dissonance 4.0.0, I'm really sorry about that! I'm putting together a quick fix now and we'll have to put out a release properly fixing the issues soon.
re: iOS - not so sure why this is broken - the android error was a change I made to make the Android build more consistent with how iOS already worked! Could you paste the error you're getting on iOS?
Here's my fix for what I think the issue is on Android (unfortunately I don't have an Android device to test it on). I've added a compiler conditional which detects if you're on one of the broken platforms (Linux/Android) and inserts some different code to (hopefully) fix the problem. You'll need to put this into Assets/Plugins/Dissonance/Core/Audio/Codecs/Opus/Opus.cs
, replacing the blocks for dissonance_opus_decoder_ctl_out
and dissonance_opus_decoder_ctl_in
.
Edit I forgot to mention you'll also have to do the equivalent for the encoder two blocks. It's basically the same code, but replace decoder
for encoder
.
iOS: it was not a runtime exception it's compiletime error.
Undefined symbols for architecture arm64:
dissonance_opus_encoder_ctl_in
@martindevans
I got a new exception after applied your patch. (I fixed your code, because your there was a error.)
internal static int dissonance_opus_encoder_ctl_out(IntPtr st, Ctl request, out int value) {
// added 'return' since it requires to return something.
return opus_encoder_ctl(st, request, out value);
}
Exception: Error: Encoder error (Ctl SetInbandFECRequest): BadArg! This is probably a bug in Dissonance, we're sorry! Please report the bug on the issue tracker "https://github.com/Placeholder-Software/Dissonance/issues". You could also seek help on the community at "http://placeholder-software.co.uk/dissonance/community" to get help for a temporary workaround. Error ID: 4AAA9AA6-8429-4346-B939-D113206FFBA8
Dissonance.Audio.Codecs.Opus.OpusNative+OpusEncoder.OpusCtlIn (Ctl ctl, Int32 value) (at Assets/Plugins/Dissonance/Core/Audio/Codecs/Opus/Opus.cs:444)
Dissonance.Audio.Codecs.Opus.OpusNative+OpusEncoder.set_EnableForwardErrorCorrection (Boolean value) (at Assets/Plugins/Dissonance/Core/Audio/Codecs/Opus/Opus.cs:326)
Dissonance.Audio.Codecs.Opus.OpusEncoder..ctor (AudioQuality quality, FrameSize frameSize) (at Assets/Plugins/Dissonance/Core/Audio/Codecs/Opus/OpusEncoder.cs:30)
Dissonance.CodecSettings.CreateEncoder (AudioQuality quality, FrameSize frameSize) (at Assets/Plugins/Dissonance/Core/CodecSettings.cs:83)
Dissonance.CodecSettings.CreateEncoder () (at Assets/Plugins/Dissonance/Core/CodecSettings.cs:95)
Dissonance.Audio.Capture.CapturePipelineManager.RestartTransmissionPipeline () (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:239)
Dissonance.Audio.Capture.CapturePipelineManager.Net_ModeChanged (NetworkMode mode) (at Assets/Plugins/Dissonance/Core/Audio/Capture/CapturePipelineManager.cs:112)
Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].OnModeChanged (NetworkMode obj) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:532)
Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].set_Mode (NetworkMode value) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:255)
Dissonance.Networking.BaseCommsNetwork`5+Session[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].Enter () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:130)
Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].ChangeState (IState newState) (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:372)
Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].LoadState () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:324)
Dissonance.Networking.BaseCommsNetwork`5[Dissonance.Integrations.UNet_HLAPI.HlapiServer,Dissonance.Integrations.UNet_HLAPI.HlapiClient,Dissonance.Integrations.UNet_HLAPI.HlapiConn,Dissonance.Unit,Dissonance.Unit].Update () (at Assets/Plugins/Dissonance/Core/Networking/BaseCommsNetwork.cs:317)
Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork.Update () (at Assets/Dissonance/Integrations/UNet_HLAPI/HlapiCommsNetwork.cs:80)
Tom reproduced your iOS problem and I know how to fix that, I've also just finished investigating the Linux build and have hopefully fixed that (about to test it). The plan will be to get a new version submitted to the store on Monday with fixes for all the platforms - that takes a few days to go through the store submission after which it will be generally available for download. In the meantime if you need a fixed version right now contact me with your invoice number and I can give you the previous Dissonance version to use (3.0.3).
We've just submitted Dissonance 4.0.1 to the asset store which fixes this issue. That can take several days to go through the approval process, I'll close this issue once it becomes generally available on the asset store :)
Dissonance 4.0.1 just went live on the asset store (looks like they pushed it through quickly for us, thanks Unity!). I'll close this issue now but don't hesitate to re-open it if there's still a problem :)
Hi
I found an error with Android build. I'm currently using Unity 2017.2 and Dissonance 4.0.0.