Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[Released] Dissonance: Unity Voice Chat

Discussion in 'Assets and Asset Store' started by Nyarlathothep, Oct 27, 2016.

  1. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi @Mikullandjello

    I'm afraid Photon BOLT still hasn't made it's way to the top of our todo list. Throughout April we were working on the brand new Voice detector (the old one was pretty rubbish) and now our focus is investigating how to implement acoustic echo cancellation (which is pretty critical for voice chat on mobile devices).
     
  2. Mikullandjello

    Mikullandjello

    Joined:
    Jan 24, 2016
    Posts:
    14
    Hi @Nyarlathothep

    Thanks for the reply and understood! Can you give me any estimation as to how much longer til it will be on top of your todo list? Even something broad like "3-4 months" would help give me a good idea!

    Thanks again!
     
  3. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    I would hope we have a bolt integration complete within 3-4 months :)
     
  4. Mikullandjello

    Mikullandjello

    Joined:
    Jan 24, 2016
    Posts:
    14
    Got it, thank you! Last question: Any good way I can keep up with the development process, so I dont miss out when Bolt is integrated?
     
    Nyarlathothep likes this.
  5. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    The best way to keep up to date is probably to watch this thread, I post here for every new version of Dissonance with a brief summary of features and a link to a complete changelog. Besides that there is also our twitter account @PlaceholderSoft and the RSS feed on our news page.
     
  6. Mikullandjello

    Mikullandjello

    Joined:
    Jan 24, 2016
    Posts:
    14
    Great to know, thank you and looking forward to the update :)
     
  7. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    I'm happy to announce Dissonance 1.0.9 has just gone live on the asset store!

    The biggest change in this release is a new process for installing integrations - when you install/update Dissonance a window will pop up offering to take you to a website which contains download links for all available integrations. This makes the installation much smoother as the package no longer generates compile errors if you install it all (due to installing integrations you don't need). It also allows us to push updates for integrations without having to go through an entire asset store approval cycle, giving us a much faster cycle for fixing our integrations when other assets make breaking changes.

    Of course we've also added some other smaller features and made some bugfixes - see the full changelog here.
     
  8. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Unfortunately I just discovered I made a critical mistake with the 1.0.9 release! The brand new installation window pops up once when you first install the asset... unfortunately I accidentally added the file which prevents it from popping up to release the package and so no one is seeing the installation window. I'm submitting Dissonance 1.0.10 to the asset store right now which will fix this issue.

    If you've installed Dissonance 1.0.9 you should click Window > Dissonance > Welcome Window - this will pop up the window and take you to the page where you can download the integrations.
     
  9. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    The Salsa+Dissonance integration has just been updated to enable realtime lip synchronisation for the local player! This uses the new microphone amplitude measure introduced into Dissonance 1.0.9.

    Big thanks to Crazy Minnow Studios for really taking the lead on this integration :D
     
  10. VultureG5

    VultureG5

    Joined:
    Jun 20, 2013
    Posts:
    5
    Hey @Nyarlathothep,

    I just wanted to give you a heads up that it looks like there's a minor bug in line 83 of the MicrophoneCapture script. The line reads:

    if (Microphone.devices.Contain(micName)

    but it should read

    if (!Microphone.devices.Contains(micName)

    since otherwise the default mic and warning message is sent when the mic is found, instead of when it isn't.
     
    Nyarlathothep likes this.
  11. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Oops :oops:

    Thanks for the heads up A fix will be included in the next version. If you're changing this in your own project the line should actually read:

    if (micName != null && !Microphone.devices.Contains(micName))

    Since null is a valid value, but is obviously not included in the devices list.
     
    VultureG5 likes this.
  12. JulieHeyde

    JulieHeyde

    Joined:
    Jun 19, 2013
    Posts:
    4
    Hi Placeholder folks, we're using UNET LLAPI for some of our games and I came across your asset today (which might save me a lot of trouble - fingers crossed). Have you had any use-cases in VR/SteamVR/Vive-specifically yet?

    Julie/@VRUnicorns
     
    Nyarlathothep likes this.
  13. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi JulieHeyde, we've had quite a few people working on VR games using Dissonance. In fact I would guess that it may be our most common use case!
     
  14. JulieHeyde

    JulieHeyde

    Joined:
    Jun 19, 2013
    Posts:
    4
    Wuhuhuhu...can you share any dev/game names? And are they using SteamVR or Oculus SDK? It might matter.
     
    Nyarlathothep likes this.
  15. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    I think the most notable example of Dissonance in VR is probably OrbusVR. The developer was one of our earliest testers and has adapted Dissonance to work with huge numbers of players (800 in one of his tests)!

    I'm afraid I don't know any details about which SDK people are using - it's not something that anyone has mentioned in a support request yet. I would say though that either SDK should work and we'd definitely support you if you had a problem getting one to work.
     
  16. JulieHeyde

    JulieHeyde

    Joined:
    Jun 19, 2013
    Posts:
    4
    That's for Vive - thanks ;-)
     
    Nyarlathothep likes this.
  17. JulieHeyde

    JulieHeyde

    Joined:
    Jun 19, 2013
    Posts:
    4
    Nyarlathothep likes this.
  18. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Dissonance 1.1.0 has just released on the asset store!

    This release brings two really big new features; Photon BOLT support and completely rewritten demo scenes. The new Demo scenes are a much more complete demonstration of all that Dissonance can do and also show the correct way to use Dissonance with each different network integration.

    Of course we've added some smaller features and fixed some bugs, check out the full release notes here.

    Alert!
    Edit: This issue has been fixed in Dissonance 1.1.1 which just went live on the asset store.

    We seem to have a problem with the import settings for the native plugins in this release (affecting Unity 5.5 and below)! Once you have installed 1.1.0 find the native plugins in Assets/Plugins/Dissonance/Plugins and then in the x86 and x86_64 folders make sure that the import settings for the AudioPluginDissonance files look like a bit this:



    The important thing to check is both the Editor and Standalone boxes are checked.
     

    Attached Files:

    Last edited: Jun 20, 2017
    jashan likes this.
  19. Aphid

    Aphid

    Joined:
    Dec 16, 2013
    Posts:
    14
  20. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    226
    This looks interesting for an upcoming project...

    1) Do you have any videos overview/setup, etc.?
    2) What do you recommend as a max user/player count?
     
  21. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi digiross

    We have docs online here. Check out the getting started guide for whichever network system you intend to use. We have some YouTube videos but I'm intending to remake them soon (they're out of date due to some new features).

    Dissonance uses roughly 6KB/s/player. So you should easily handle 10 players in a session. It's largely determined by you host upload band with. We're going to investigate p2p routing soon which may increase this further. FWIW no one had ever contacted me for sort due to band with limitations.
     
  22. petri_fake

    petri_fake

    Joined:
    Jan 10, 2017
    Posts:
    2
    Hi! We are developing an application that requires the ability to record and play back the individual voice streams of each participant in a multiuser session.

    For remote players, it was easy enough to add our own script component to the voice playback prefab that taps into the DSP chain using the OnAudioFilterRead callback (although this gets the spatialised 3D audio instead of the mono stream, but it's good enough for now).

    For the local player however, accessing the microphone doesn't seem to be possible when Dissonance is already using it, so we'd need some way to read the buffers from inside Dissonance. Looking at the docs and source code, there doesn't seem to be any public interface that facilitates this, so it seems the only option would be to alter the source code of Dissonance itself so that it exposes the microphone input buffer or writes a copy into an additional supplied location such as a MemoryStream.

    I'd appreciate any input on what you'd consider to be the best way to do this. Dissonance is working great for our purposes, but this has had me stumped for a while now.
     
    Nyarlathothep likes this.
  23. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi petri_fake

    There is a pretty good internal API for this:

    var comms = FindObjectOfType<DissonanceComms>();
    IMicrophoneHandler handler = Your_Object_Which_Gets_Mic_Data;

    // MicCapture is internal, change it to public for this next line to work
    comms.MicCapture.Subscribe(handler);

    Once you have subscribed to receive microphone data you will get the blocks of data post preprocessing. This is the exact same data which is encoded and sent across the network.
     
    Aphid and petri_fake like this.
  24. petri_fake

    petri_fake

    Joined:
    Jan 10, 2017
    Posts:
    2
    Nyarlathothep likes this.
  25. DizzyWascal

    DizzyWascal

    Joined:
    Jul 16, 2015
    Posts:
    16
    When using Unity's Unet HLAPI, will this use the relay servers and increase the Monthly bill?
    Nyarlathothep mentioned it roughly uses 6KB/s/player. Looking at Unity's monthly bill calculator that's close to $300 a month for 500 concurrent users?
     
    Nyarlathothep likes this.
  26. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Dissonance simply sends packets through whatever network session you've configured it for. So yes it will pass through the relays servers if you're using Dissonance over HLAPI and relays are in use (I believe relays are not used if you avoid the matchmaker and use direct connect only).

    The price calculator probably isn't very accurate here - the bandwidth figure I mentioned is the rate they use while talking, but of course players spend a very small percentage of their time talking (even for a 1 on 1 conversation any particular person is only talking 50% of the time).

    If you're still worried about costs then another option is to use a different network integration. For example you could setup an LLAPI session and use that to direct connect the players in the session, this should work alongside a HLAPI session. Of course this comes with all the classic port forwarding/NAT translation issues which the HLAPI handles for you.
     
    DizzyWascal likes this.
  27. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Dissonance 2.0.0 has just been released on the asset store!

    This release includes two big new features: host migration and a new audio preprocessor.

    The host migration support is very significant for a few reasons. Previously when a host migrated Dissonance would be in a broken state (still in the session, trying to communicate with the old host) and required you to destroy and recreate the Dissonance components. Now the network system handles this entirely automatically so as long as you have connectivity Dissonance should keep transmitting voice.

    The new preprocessor is based on the webRTC project which we were previously using for the voice detection. This provides better voice quality, better noise reduction, more responsive gain control and will perform better on all platforms.

    Breaking Change

    If you have written a custom networking integration for Dissonance there are some breaking changes in this version (to support the new host migration system). The changes are not very large and should not present much of a challenge for anyone to fix - see the documentaton here and feel free to contact me if it's unclear.

    Unity 5.4.4 Support

    We made a last minute decision not to put out a package for Unity 5.4.4 on the store with this release due to a number of errors in that version (we develop with 5.6 and the import process broke). If you use Unity 5.4.4 and this is an issue for you please contact me and I can provide you with an updated package - we'll be looking at how many people contact me to decide if we should include 5.4.4 support in the future.
     
  28. Sylvie_Spaces

    Sylvie_Spaces

    Joined:
    Jun 1, 2017
    Posts:
    3
    Hi,

    Does Dissonance currently support Unity 2017? If not, when do you expect to support it?
     
    Nyarlathothep likes this.
  29. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    We haven't tested Dissonance with Unity 2017 yet, but I don't anticipate any problems. I'll be happy to provide support for anyone using 2017.1 and we'll probably include an official 2017.1 version of the package with the next release.
     
  30. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    89
    Hi @Nyarlathothep,

    Dont know if its a 2017 thing or not but Im trying to run the hlapi demo and Im getting the following errors

    followed by

     
  31. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi @popMark

    I haven't seen that before. The first error is Dissonance refusing to create a decoder because the audio sample rate is wrong and then the second error is simply a null reference because the decoder doesn't exist (due to the first error).

    Could you open up an issue on the issue tracker and give me the details - particularly stack traces of the first error.
     
  32. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    Hello,

    I try to implement Dissonance in our VR network software with Unet HLAPI and it seems to work well most of the time, but sometimes when the client disconnect from the server or when the server shutdown (we return to the offline scene) the game crash. The error message is an access violation and talk about opus.dll.

    Can it be related to VR stuff like headset discovery or disconnection ?

    EDIT : (Add error message)
    Sometimes we also have this other log error

    Code (CSharp):
    1. [Dissonance:Network] HlapiCommsNetwork: Encountered error shutting down client: 'Object reference not set to an instance of an object'
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(LogType, Object)
    5. UnityEngine.Debug:LogError(Object)
    6. Dissonance.LogMessage:Log() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Log.cs:106)
    7. Dissonance.Logs:SendLogMessage(String, LogLevel) (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Log.cs:135)
    8. Dissonance.Log:WriteLog(LogLevel, String) (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Log.cs:207)
    9. Dissonance.Log:WriteLogFormat(LogLevel, String, String) (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Log.cs:230)
    10. Dissonance.Log:Error(String, String) (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Log.cs:380)
    11. Dissonance.Networking.BaseCommsNetwork`5:StopClient() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:367)
    12. Dissonance.Networking.Session:Exit() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:139)
    13. Dissonance.Networking.BaseCommsNetwork`5:ChangeState(IState) (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:286)
    14. Dissonance.Networking.BaseCommsNetwork`5:LoadState() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:255)
    15. Dissonance.Networking.BaseCommsNetwork`5:Update() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Plugins\Dissonance\Core\Networking\BaseCommsNetwork.cs:248)
    16. Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork:Update() (at E:\_UnityProjects\INT00021_VirtualShowroom_POC.git\Assets\Dissonance\Integrations\UNet_HLAPI\HlapiCommsNetwork.cs:56)
     
    Last edited: Aug 1, 2017
  33. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi @JonathonLefebvre,

    An access violation exception is caused by passing a pointer to invalid memory. Opus is just the audio codec and shouldn't have it's behaviour affected in any way by the presence of a VR headset! Could you open an issue on our issue tracker with all the details (a stack trace or any exceptions you get, or the log files if the editor crashes).

    I guess that second error is probably related to the first (shutdown tries to gracefully close the decoder, but the decoder has already died due to the first error). Again, if you could include any stack traces or logs related to the error that'd be really helpful :)
     
  34. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Dissonance 3.0.0 has just been released on the asset store!

    This is our biggest release yet with four new features: UWP support, Forge Networking Remastered integration, per channel soft fading and peer to peer voice routing!

    Universal Windows Platform
    Now you can use Dissonance in apps targeting the UWP (also known as WSA in older versions of Unity). This allows Dissonance to run on some pretty cool devices like the Windows mixed reality devices and the Microsoft hololens. Currently this only works for x86 and x86_64 architectures, so you can't target windows phones - contact me if that's something you're interested in doing.

    Forge Networking Remastered
    A lot of people have asked for this and it's finally here; we now have an integration available for Forge Networking Remastered. With this it's now just drag-and-drop to use Dissonance in FNR. Big shout out to the people on the FNR discord who helped me develop and test this.

    Per Volume And Soft Fading
    It's now possible for a speaker to set the transmitted volume of their voice on a per channel basis, we've used this to add a fade in and fade out to every single broadcast trigger. These are particularly nice when used in conjunction with physics trigger activated broadcasters - voice softly fades on over a couple of seconds as the speaker walks into the volume and then fades out when they leave.

    Peer-To-Peer Voice Routing
    The largest change of all in this patch is a total rewrite of the networking internals - as part of the rewrite we made it possible for peers to send voice directly to other peers. This can halve latency and reduce bandwidth costs on metered networks. Currently this is in use only on the PUN integration (which still sends via the PUN cloud, but now does it in a single hop).

    We tried very hard not to change the custom networking API - the intention was that all custom networking implementations would continue working the same as before and they could write a tiny bit of extra optional code to enable p2p routing if necessary. We almost managed it, these changes involve a single very minor breaking change to custom network integrations. See the
    changelog for more details
     
  35. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,105
    Very awesome! We've had a decent base of a networking implementation based on Unity Networking but then ran into too many issues, so we'll port to either Photon Unity Networking or Bolt fairly soon, and voice chat is one of the bigger challenges we need to have solved ... so I'm super-stoked to hear this is working with Bolt (that's currently our favorite because it has really good support for local networks).

    Will this also work with PlayStation 4? It's one of our target platforms and we want to be able to have console players play with players on PC. PS4 is not super-urgent but it's something I need to keep in mind for the longer-term.
     
  36. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    > Will this also work with PlayStation 4?

    Unfortunately it won't work on PS4 at the moment. It's difficult for us to work with PS4 because all of the documentation and tooling is not available unless you're a registered PS4 developer.

    The bit that won't work is the native plugins - source code for those is available on request to anyone who owns the package, so it should be possible for you to compile for the PS4 and I'll offer as much help as I can with that :)
     
  37. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,105
    Yeah, Sony is fairly strict with their NDAs. Do the native plugins have major dependencies? If not, this *should* work (fingerscrossed) ... I don't have a lot of experience compiling native stuff for PS4, yet, but I'm sure that can be learnt.

    I'll get back to you about it once we're back in PS-dev mode ... that won't be tomorrow ... more like end of this year, I guess.
     
  38. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    > Do the native plugins have major dependencies?

    There are two native plugins.

    The codec is Opus. This is listed on their wiki as a component used by their own software so you can probably get help on the PS4 developer forum for compiling this.

    The preprocessor is based on WebRTC. This is a significantly larger dependency and is more likely to be a problem (simply because no one else is likely to have used it on PS4). It's possible to run Dissonance without a preprocessor - audio quality would suffer a lot but at least you can develop the game while working on compiling webRTC.
     
  39. awonnink

    awonnink

    Joined:
    Jan 19, 2017
    Posts:
    5
    Just started to try this asset (3.0.0). The Unet HLAPI works great. I have however tried to follow the instructions for the LLAPI, but the message 'Attempted to send voice before assigned a client ID by the host' is returned. Am I missing some setting? I'm using 2017.1.0f3 (the readme for the LLAPI seems also not quite correct, for there is no LLAPI Game World scene. I didn't get the demo scene for the LLAPI working either (assuming I could use the same scene for the server and the client))
     
    Nyarlathothep likes this.
  40. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi awonnink,

    I've just tested the LLAPI network locally and it's working for me, I did notice a few errors in the documentation which I've fixed - thanks for pointing those out. As you mentioned there is no "Game World" scene - unlike the other demos the LLAPI is all based in one scene (it's a much more primitive demo, because LLAPI is so low level). The button labels were also wrong, but I expect you figured those out. Additionally the trigger which tells Dissonance when to transmit voice use the "TeamChat" input axis, the docs incorrectly state that it uses the "GlobalChat" axis. I've fixed these things and they'll be in the next version of Dissonance. I have attached the fixed docs :)

    None of that explains the error you get. That error happens when you're trying to send voice but you haven't yet established connectivity to the server. That should take well under a second so if it persists it probably indicates a lack of connectivity altogether.

    What problem did you get when trying the demo scene? Using the same scene on the client and server sides should have worked.
     

    Attached Files:

  41. awonnink

    awonnink

    Joined:
    Jan 19, 2017
    Posts:
    5
    I must have unchecked the 'play in background' setting between my HLAPI test and LLAPI text. Now the LLAPI test also works fine. Thanks!
     
    Nyarlathothep likes this.
  42. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Aha well spotted - I'm glad it was a simple fix ^_^
     
  43. awonnink

    awonnink

    Joined:
    Jan 19, 2017
    Posts:
    5
    I have created a very simple unity game that should act as a dedicated server using the LLAPI. When I start the game on a Windows 2012 server it consumes about 40% processor capacity, going sometimes up to 90% or more after connecting with a client.
    When I run it on my development PC the server seems to be ok.
    Any idea what might be the cause of this?
    I simply use in the startupscript:
    var dissonanceNetwork = GetComponent<UNetCommsNetwork>();
    dissonanceNetwork.InitializeAsDedicatedServer();
    I have also disabled the camera to improve performance. dissonance_server_issue.png

    Question 2: is there perhaps code available for implementing the server part as a pure c# project (windows service)?
     
  44. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    > When I start the game on a Windows 2012 server it consumes about 40% processor capacity, going sometimes up to 90% or more after connecting with a client.

    That's definitely not right! Dissonance should be quite lightweight in terms of CPU usage. Especially the dedicated server - it does essentially no work as it's just routing packets from client to client! Could you open up an issue on the issue tracker and give me any information you can about your setup, when you see the high CPU usage, and any profiling information about which behaviour is consuming all the CPU if possible.

    > is there perhaps code available for implementing the server part as a pure c# project (windows service)?

    The native parts are only used for audio processing. It should be easy to run a dedicated server without loading them up (even if Dissonance does load them you can remove that code on the dedicated server with no negative impact).
     
  45. awonnink

    awonnink

    Joined:
    Jan 19, 2017
    Posts:
    5
    Thanks, I have added the issue to the issue tracker.
     
    Nyarlathothep likes this.
  46. markus_fake

    markus_fake

    Joined:
    Feb 24, 2017
    Posts:
    2
    Hello @Nyarlathothep ,

    I am having trouble with the UWP build of Dissonance (2017-08-23_3.0.0). Just trying to run the example project gives me exceptions in Visual Studio, namely the Opus dll cannot be loaded. I am trying to run Debug / x86 on my device (Hololens), and this is what I get:

    + $exception {System.DllNotFoundException: Unable to load DLL 'opus': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    at Dissonance.Audio.Codecs.Opus.OpusNative.OpusNativeMethods.opus_encoder_create(Int32 samplingRate, Int32 channels, Int32 application, Int32& error)
    at Dissonance.Audio.Codecs.Opus.OpusNative.OpusEncoder..ctor(Int32 srcSamplingRate, Int32 srcChannelCount)
    at Dissonance.Audio.Codecs.Opus.OpusEncoder..ctor(AudioQuality quality, FrameSize frameSize)
    at Dissonance.CodecSettings.CreateEncoder()
    at Dissonance.DissonanceComms.RestartTransmissionPipeline()
    at Dissonance.DissonanceComms.Net_ModeChanged(NetworkMode mode)
    at Dissonance.Networking.BaseCommsNetwork`5.OnModeChanged(NetworkMode obj)
    at Dissonance.Networking.BaseCommsNetwork`5.set_Mode(NetworkMode value)
    at Dissonance.Networking.BaseCommsNetwork`5.Session.Enter()
    at Dissonance.Networking.BaseCommsNetwork`5.ChangeState(IState newState)
    at Dissonance.Networking.BaseCommsNetwork`5.LoadState()
    at Dissonance.Networking.BaseCommsNetwork`5.Update()
    at Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork.Update()
    at Dissonance.Integrations.UNet_HLAPI.HlapiCommsNetwork.$Invoke13Update(Int64 instance, Int64* args)
    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)} System.DllNotFoundException

    opus.dll can be found on the project hierarchy and on disk. Any ideas?

    best regards,
    Markus​
     
  47. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Hi Markus,

    That message is a little misleading, when it says `specified module could not be found` it really means the module or one of it's dependencies could not be found. The only runtime dependency Opus has is the vcruntime140 so I assume that's not installed on your device. If you install the visual studio 2015 redist that will install it for you.

    However, this obviously isn't ideal! I've just recompiled Opus.dll to statically link in it's dependencies and I'll probably change Dissonance over to use that for the next release. If you email me your order number (martin@placeholder-software.co.uk) I can send you the recompiled opus.dll to try :)
     
  48. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    Dissonance 3.0.2 Is Available On The Asset Store
    We made two large changes in this release as well as a number of small fixes and features driven by user feedback. Read the full release notes here.

    Update Checker
    A lot of people who contact us for support turn out to be suffering from a problem which we've already fixed in a previous version! We've added an update checker to Dissonance which checks the website for new releases and alerts you when a new version is available. It will only popup once for each new version of Dissonance, and if you find that annoying it's easy to disable the update checker altogether.

    Dynamic Quality Adjustment
    We've made a number of improvements to voice chat in adverse network conditions. When there is high packet loss or very high latency jitter Dissonance will automatically reduce the quality of voice encoding and instead will encode more resilience into packets (maintaining the same bitrate). At the opposite end of the scale we also upgraded the encoder to Opus 1.2.1 which will slightly improve voice quality in perfect network conditions with high bitrates.

    3.0.1
    You may be wondering what happened to Dissonance 3.0.1 - we discovered a critical bug in the release just a few hours after it was submitted to the asset store. We instantly pushed out Dissonance 3.0.2 with a fix to this - if you are using 3.0.1 please upgrade to 3.0.2.
     
  49. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    193
    I'm currently trying to integrate Dissonance into my multiplayer game but I'm having some trouble setting up proximity chat so you can only hear nearby people talking.

    I am using the uLink Network Engine and the game is built around an authoritative server and I'm starting the Dissonance server with InitializeAsDedicatedServer().

    There are three prefabs that I use to represent players:
    a) Owner prefab - The prefab that the local player controls (exists on the client)
    b) Proxy prefab - The prefab that represents other players in your game (exists on the client)
    c) Creator prefab - The prefab on the server that represents the players (exists on the server)

    I'm having some trouble in determining which Dissonance components should be attached to which prefabs. For example, should the VoiceBroadcastTrigger be attached to all three prefabs, or just the two client ones? And does the same goes for the VoiceReceiptTrigger component?

    And what components should be attached to the server prefab? Should the server prefabs have any components attached to it?

    I have implemented my own version of IDissonancePlayer and but I'm not sure on which prefabs I should attach it to. Should it be attached to all three prefabs, or just the two client ones (Owner and Proxy)? And if the server prefab requires an IDissonancePlayer component, what NetworkPlayerType should it use, NetworkPlayerType.Local or NetworkPlayerType.Remote?

    Thank you very much for your time,
    // Dreas.
     
    Last edited: Oct 2, 2017
    Nyarlathothep likes this.
  50. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    250
    - VoiceBroadcastTrigger controls where the local player sends voice to. You can broadcast either to a room (which requires people to subscribe to the room) or directly to a player (in which case they hear it). If you try to transmit directly to yourself nothing will happen (you won't hear your own voice).
    - VoiceReceiptTrigger controls which rooms the local player is listening to. You don't need a receipt trigger for direct player voice - you always receive voice sent directly to you.
    - IDissonancePlayer derived components are used by the playback system to determine where voice should be played back spatially.

    With those definitions out of the way it sounds like you want:

    - Owner prefab doesn't need anything attached. The local player is receiving voice and since your voice will be player targetted they don't need a receipt trigger. You could attach your IDissonancePlayer implementation to this (Local) - currently the local one is largely ignored (since it's used for playback, and you never play back your own voice).
    - Proxy prefab needs a volume activated broadcast trigger and your IDissonancePlayer (Remote) implementation attached. Set the broadcast trigger to broadcast to "self", this will find the IDissonancePlayer and will send the voice to whichever player that represents. The position of the IDissonancePlayer component is the position speech for this player will emanate from.
    - Creator prefab needs nothing attached. The server neither sends voice, receives voice or plays back voice so none of the components are important.

    Hopefully that answers everything :)