Photon Voice on MacOSX errors: DllNotFoundException: opus_egpv

mvriel
mvriel
edited March 2016 in Photon Voice
When I try to connect using my AppId with Photon Voice from the 'OnJoinedRoom' event in my MatchMaker by instantiating a Prefab containing the Photon View and Voice Recorder I get the following error in my Console:

DllNotFoundException: opus_egpv
POpusCodec.Wrapper.opus_encoder_create (SamplingRate Fs, Channels channels, OpusApplicationType application) (at Assets/Plugins/POpusCodec/OpusWrapper.cs:124)

According to what I can gather the Opus Plugin for MacOSX doesn't seem to be loaded (correctly); even when I adjust the settings for the plugin I can't get this working.

Do any of you know what might be wrong?

Comments

  • In addition to the above I have noticed as well that trying to build an iOS application fails because of the opus_egpv that cannot be compiled for ARM
  • Same problem here. Some help?
  • I would love a reaction from someone of Photon; I wonder whether this can be easily resolved or we should wait until the next release?
  • JohnTube
    JohnTube ✭✭✭✭✭
    @mvriel please find a solution here.
  • I will try that out and report back; thanks for the reply!
  • milespeyton
    edited April 2016
    @JohnTube Hello, I'm still having this problem after following the posted solution. I don't have the problem in the editor, but I still get the error in my development build after copying libopus_egpv to /Contents/Frameworks/MonoEmbedRuntime/osx.

    Edit: Fixed it! For anyone else who has this problem, I changed "architecture" to "Universal" in the build settings. It was "x86" before.
  • @milespeyton: Thanks for the input! Interesting that x86 broke the build.

    There is a new v1.1 version in the Asset Store now. In our tests, this fixed the situation on Mac (without having to copy stuff around).
    Let us know if it's working for you, too, ok?! :)
  • strikky
    strikky
    edited April 2016
    Also getting linker warning:

    ld: warning: ignoring file /Users/xxx/experimentz/ builld/Libraries/Plugins/iOS/libopus_egpv.a, file was built for archive which is not the architecture being linked (armv7): /Users/xxx/experimentz/ builld/Libraries/Plugins/iOS/libopus_egpv.a

    This then leads to a world of linker errors from libopus being excluded from the build..
  • Ok.... I got this working:

    1) Rebuild libopus for armv7 (use this guy's script) and add to plugins/ios
    2) Modify OpusWrapper.cs - Check out libopus' source documentation for encoder/decoder. You'll see there are no functions "opus_decoder_ctl_set/get opus_decoder_ctl_get" so you'll need to change the dll import to opus_decoder/encoder_ctl.... cast the GetRequest/SetRequest enums to ints before passing them in and pass in references to ints as the final parameter...

    Only vaguely tested it but it builds and voice is transmitted and received ok on an iOS device.
    If none of this makes sense - I'm being a bit vague but if you can't work it out from the above then probably best wait for a patch.
  • vadim
    vadim mod
    edited April 2016
    We use slightly modified version of opus sources. That's why you need to update OpusWrapper.cs when compiling opus yourself.
    armv7 architecture was missed in 1.1 release accidentally. Please download updated fat lib with both architectures inside https://www.dropbox.com/s/bpsnkfn1zw66f23/libopus_egpv.a?dl=0
  • In the new v1.2 release, Mac and iOS are supported out of the box.
    https://www.assetstore.unity3d.com/en/#!/content/45848