Search Unity

[Deprecated] Master Audio Multiplayer - the ONLY multiplayer audio solution! Use Photon / Mirror!

Discussion in 'Assets and Asset Store' started by jerotas, Dec 23, 2016.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.2 changelog:

    • Added support for experimental Fast Play Mode in Unity 2019.3 - it works by default it you turn on Fast Play Mode on the Unity menu as shown on this page: https://blogs.unity3d.com/2019/11/05/enter-play-mode-faster-in-unity-2019-3/
    • Fixed bug where Persistent Playlist Volume wouldn't work properly with persistent Master Audio game objects.
    • Moved Show Welcome Window preference to scriptable asset so it's only for current project, not all.
    • Added Min Distance field to Ambient Sound so you can adjust that, which also affects the low slider value of Max Distance.
    • Added namespaces to all example and editor scripts so they don't show up in Intelli-sense.
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.3 changelog:
    • Fixed links in Welcome Window since our hosting changed.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.4 changelog. HUGE update!
    • Breaking Change: Removed "Stop Oldest" checkbox for the Bus. Instead there is a "Voices Exceeded Behavior" dropdown there to choose "Do Not Play New Sound" or "Stop Oldest Sound". This dropdown appears when you set a voice limit for the Bus. If you had previously set "Stop Oldest" checkbox, you will need to select "Stop Oldest Sound" from the dropdown now to get it to work the same as before.
    • Breaking change: FadeOutNow method on SoundGroupVariation is renamed to FadeOutNowAndStop, because it does stop at the end, always has. If your scripts call this, you will need to update your call to the new method name.
    • Fixed bug: Single song playlist that loops with Preload Audio Data turned off would loop just the crossfade section endlessly.
    • Fixed bug: Sound Groups limited by "Limit Polyphony" option can now find a Variation to play using Retrigger Percentage, if one exists that satisfies that.
    • Fixed bug: Bus "stop oldest / farthest" sometimes stopped a voice and not end up playing a new one.
    • Fixed bug: Bus "stop oldest / farthest" sometimes wouldn't play a new one when maxed out on voices.
    • Fixed bug: Playing a voice with Retrigger Percentage would also stop the oldest voice when not necessary.
    • Fixed bug: Bus voice limit requires an additional variation to exist for the group to play a new voice even when Bus Stop Voice Fade Time is 0 (i.e. you had to have 3 group voices with bus voice limit 2).
    • Fixed bug: AudioScriptOrderManager was executing every time you press play. Now it only executes when you open Unity.
    • Fixed bug: A a song that was fast-forwarded by code would then start that song next time in the fast-forwarded spot. Now goes back to zero.
    • Made music unducking start instantly if the Variation that triggered the music ducking gets paused or stopped.
    • Added help text to property drawers to let you know if Master Audio game object is not in the Scene.
    • Added new option for Voices Exceeded Behavior for the Bus: Stop Farthest Sound. If you select that, the sound playing the furthest away from the Audio Listener will be stopped to play the new sound.
    • Added new option for Voices Exceeded Behavior for the Bus: Stop Least Important Sound. If you select that, each Sound Group will have an Importance and Uninterruptible control. The Importance control you can see on the mixer if you turn it on with "Show Group Importance" and you can also see both on the Sound Group's Inspector. Importance and Uninterruptible work the same here as on Variations. If your bus is at max voices and you try to play a new sound, Master Audio will try and locate a sound that's not Uninterruptible and of lesser or equal Importance to stop. If it can't find one, the new sound won't play.
    • Added "Group Play Rule" to Mixer section. Choices are "Always" (default), "When Actor In Audible Range", and "Allow Different Per Group". This is only visible if your Group Spatial Blend Rule is not "Force All to 2D" because the audible range part requires 3D Audio Sources to pull the Max Distance value from. If you choose "When Actor In Audible Range", the Sound Group will only play if the Actor is within audible range, based on the Max Distance of the Audio Source.
    • Added a red error box if you haven't made a prefab out of the Master Audio prefabs. To tell you what to do so you don't get your settings overridden (make your own prefab).
    • Added an overload to AddSongToPlaylist that takes a MusicSetting object, so you can use that with all the properties you want.
    • Added StartPlaylistOnClip method to load a playlist and start playing a certain song.
    • Added optional callback arguments to the Fade methods on SoundGroupVariation.
    • Added "ClipLength" variable to Playmaker Custom Action "Playlist Controller Get Props".
    • Adding a song to a Playlist via code now populates the default song metadata into the song.
    • Added an option under Gapless Music Switching for "Auto-Reschedule". It will fix gapless even if you skip around in the track. It only works perfectly with pitch of 1 and sample rate of 48,000 or above. You can override your sample rate to 48,000 for it to work, and that even works on compressed files.
    • Added 2 new events to Event Sounds script: Code-Triggered Event 1 & 2. These can be called from code or used in events in the Animation Window by entering the method name (ActivateCodeTriggeredEvent1, ActivateCodeTriggeredEvent2).
    • Renamed "Show Range Gizmo" in Event Sounds to "Adjust Audio Range". Now only shows if you have a Sound Group selected to play.
    • Changed "Bus Stop Oldest Fade Time" in Advanced Settings to "Bus Stop Voice Fade Time".
    • Added Min Distance to range adjustment for Event Sounds, shown by toggling on "Adjust Audio Range".
    • Added new controls for Dialog Sound Groups: Importance slider (0-10), which you can set importance for Variations. Only Variations of equal or higher importance than the current playing Variation can interrupt it.
    • Added new controls for Dialog Sound Groups: Is Uninterruptible. Check this to hide the Importance slider and this Variation can never be interrupted by another.
    • Added Video Player support for Master Audio. Video Players have their own special Sound Group created when you drag them into the Video Players section in Master Audio. Requires Unity 2019.3+.
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.5 changelog:

    • Fixed bug: changing bus doesn't automatically fix order when using Group By Bus.
    • Fixed bug: changing the bus in Bulk Edit mode didn't work for more than 1 Group.
    • Fixed bug: unducking no longer stopped at previous volume for Playlist Controller after previous version related ducking fix.
    • Fixed bug: Addressables package broke its usage so code has been modified to work with the latest version.
    • Added 'Clip id' optional field for Variations. This allows you to now use Variations in Dialog Groups so you don't have to create so many Dialog Group. You can give multiple Variations the same Clip id and it will choose one at random when you specify that Clip id as the VariationName to play. Clip id is searched first, and then the name of the Variation Game Object after that. You can still use the Clip id in non-Dialog groups as well if you like, but it's not really necessary.
     
  5. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    Hi,
    Just one question I can't find anywhere. does it work on WebGL?
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes we work on all platforms.
     
    jocyf likes this.
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.6 changelog:
    • Fixed 2D spatialize bug.
    • Fixed bug with Dynamic SGC non-random sound "randomizer".
    • Fixed bug: When using an existing bus from DSGC but you specified "new bus", it no longer deletes the Bus when you disable the DSGC.
    • Removed unnecessary code in Silence / UnsilenceGroup methods in MasterAudio.cs
    • Fixed Unity 2017.1 compile error with Spatializer.
    • Removed Unity 5 support.
    • Added asmdef files for Core GameKit and a separate one if you have both Core GameKit and Master Audio in your project, should you need them. Install the package from the Assets/Plugins/DarkTonic/CoreGameKit/AssemblyDefinitions folder.
    • Added an option to *not* delete the Audio Source on the Audio Listener Game Object if you have one there you need. Master Audio creates one there for previewing in edit mode.
     
  8. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hi! Possible to use this with local Coop too? (splitscreen) since you can only have one audio source.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    What do you mean "you can only have one audio source"? I know of no such limitation. You can have 32 Audio Sources playing simultaneously.

    But no, you can't have 2 Audio Listeners, so this can't be used with split screen apps. In fact that is on the anti-roadmap, post #2 here: https://darktonic.freeforums.net/thread/87/feature-roadmap-master-audio-suggest
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.7 changelog:
    • All updates from MA 20.3.6.
    • Updated all Multiplayer packages for code changes (Photon / Photon 2 / Mirror / UNET). You must reinstall them after updating.
     
  11. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    One Option is to rebuild your own audio. Since you can't have two Listeners. Or look into https://assetstore.unity.com/packag...listener-pooling-audio-system-112604#releases I ended up making my own from The single player version of Master Audio years ago.. But I hear some use this, if you already have Master Audio .. look into that asset, no idea of it would work with it or not ... But I know it works for what you are looking for. You could use two but its tricky. and I don't advise it.. AAA, AA companies use Wwise as well.. its not cheap. So that is a few options for you.
     
    Last edited: Dec 27, 2020
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Wwise is a great product. If you wanna spend a pretty penny or if your project budget is under $100k, where it's free.

    If you ended up making something that may solve this for Master Audio, I'd love to see the code if you'd consider sharing it. It could make it into the core product.
     
  13. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    ya I solved this prolly 5-7 years ago for a client. (I wish I could share, but sadly I'm unable since it was part of another tool that was created .

    The issue with Wwise, under 150k, you don't get source, and no plug in access. but if you don't need much it will work well, I used it when I worked for many smaller, and Larger companies. The Pro version is 750$ which is well worth it.




    Jerotas, maybe check out that pooling asset I linked?? I know some folks who have used it, maybe, it can be used with your asset?? That would be best bet.

    PS: I owned your asset not long after you added to the asset store, back in what 2012 I think?( the single player version)
     
    Last edited: Dec 28, 2020
    jerotas likes this.
  14. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,571
    Hi, I have a question.

    Is Master Audio Multiplayer able to play audio source generated on a server across multiple clients, and have it perfectly synced in real world? That means for example, two people standing nearby and receiving the same sound without "slapback" effect occuring with sound being generated by the server.
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, it doesn't account for "ping time". Audio will play immediately on the originating client, and will be delayed by the ping time on the rest.
     
    neginfinity likes this.
  16. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,571
    Alright, thanks for the information.
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Any time.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Upgrade to Master Audio Multiplayer for only $25 for a limited time! Sale starts today.

     
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    what is this and why do I need it ?
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It's the multiplayer version of Master Audio. About 100 built in RPCs to ensure things are heard similarly on all connected clients.
     
    mattis89 likes this.
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.8 changelog:
    • Fixed bug: Refactored log code in Master Audio that finds no voices to play returned only conditionally.
    • Fixed bug: Allocation fixed for Addressable delayed cleanup.
    • Fixed bug: Jukebox display would not select Resource File from a list of Resource files in the Playlist when it was playing. It always appeared blank.
    • Fixed bug: Long Playlist names would not get truncated and mess up the Inspector.
    • Fixed bug: Not-loaded Resource file played by name would cause endless loop.
    • Fixed bug: Hitting Play with a Playlist Controller selected would cause an error when trying to display the Jukebox.
    • Fixed bug: Telling additional synced layers of music would sometimes be off by fractions of a second. We now schedule the audio change slightly ahead which minimizes this greatly. Usually eliminates it.
    • Fixed bug: Auto-advanced crossfade wouldn't work on WebGL when in background and frame rate goes to 1.
    • Added "Jukebox Filter" dropdown up top in the Master Audio Inspector. The choices are "Display All" (default) and "Display Active" which only shows Playlist Controllers that are playing songs.
    • Added a new checkbox on Welcome Window to enable Video player feature. Now turned off by default. Enable it if you want the Video Players feature and have Video package installed from Package Manager.
    • Added a gear icon in each Jukebox to select the Playlist Controller in Project View for editing.
    • Added "Sort Alpha" button for the Playlists section.
    • Added "Playlist Text Filter" to filter out Playlists whose name doesn't match.
    • Added "Pause Audio Listener" and "Unpause Audio Listener" to Global Control under Event Sounds.
    • Added "Ignore Listener Pause" checkbox (defaults to unchecked) to Playlist Controllers and Sound Groups. They will play if checked even if the Audio Listener is paused. The rest will not.
    • Added CurrentFadeStatus property to PlaylistController, to tell you the current fading status of a FadeToVolume, if one is running (FadingIn, FadingOut, NotFading).
    • Change to Singleton Scriptable for obscure "load all resources" code in other plugins.
    • Added AudioListenerPause and AudioListenerUnpause to Multiplayer Adapter classes. You must install the latest update of the 3rd party Networking integration plugin you are using.

     
  22. jamesjenningsard

    jamesjenningsard

    Joined:
    Jun 26, 2020
    Posts:
    6
    Hi! Odd very-specific-use-case question:
    Could I have a client trigger music with a button - and not only be audible to other clients, but also audible to a client who has only connected after the button has been triggered? (even if not in sync - but generally audible?)

    unrelated: curious if there's an off chance that your multiplayer hooks can be used to trigger Wwise events?
     
    Last edited: Apr 16, 2021
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, there is no "buffered events" support. Any clients not connected at the time of the event won't receive any RPCs for audio.

    There's no code written for Wwise in our codebase, so I don't think so. If Wwise wants to integrate with us I'd be happy to answer any questions for them, but I've never heard of using both Master Audio and Wwise at the same time and I'm not sure why someone would. They are competitive products.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.3.9 changelog:
    • Fixed a bunch of unintentional allocations for zero Garbage Collection.
    • Fixed Bus Solo logic, it was adding the same Bus without checking if it was in the list. Could result in weird behavior.
    • Fixed Bug: Warming Group would not disable after the warming play if it's a normal Audio Clip and not Addressables / Resource.
    • Fixed Bug: duplicate named Ambient Sound game objects would sometimes delete 1 or more of the followers and Ambient Sound script wouldn't work as a result.
    • Moved all Master Audio custom actions for Playmaker into the Master Audio category.
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
  26. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    107
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We could ask the author if he's willing to develop it, if you're interested?
     
  28. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    107
    I own both assets but the author of mmorpgkit is busy with updates to his kit so I came to ask you instead.
    I will try to look at the UNET package and see if I can replicate it since litenetlib is more or less built mimicking UNET
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok. I'm super busy as well with updates for the upcoming Master Audio 2022 release.

    If you get anything working and want to share it, please email us.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio 2022 is released! It's a major version, paid upgrade. Don't worry, it's only $10 for existing Master Audio users and free for users of Master Audio Multiplayer. After 1 week, it will revert to $20 upgrade so grab it now here.

    Major features include the ability to loop a section of a song and multiplayer functionality previously only included in the Master Audio Multiplayer plugin.

    Huge release! Full changelog:

    • Fixed bug where Variations were not found because of name containing "Clone" for Variations with Weight > 1.
    • Fixed bug in Unity 2021 where domain not reloading settings broke outside the editor.
    • Fixed bug with calculation of "is too far away to play" Audio.
    • Fixed bug where Group Polyphony Limit didn't work properly on certain settings.
    • Fixed bug where after a Variation fade, changing the Master Mixer Volume would set the volume to a percentage of the original pre-fade volume.
    • Fixed bug: Sound Group Organizer didn't copy Voices field.
    • Fixed bug: Turning on both "Use Closest Collider Position" and "Follow Caller" for Ambient Sound would make the collider positioning not work.
    • Fixed bug: Warming sound, if Resource File, would not disable itself after playing during warm up.
    • Fixed bug: Previewing in edit mode would randomly stop working after 1 minute of inactivity.
    • Fixed bug: Sound Group Organizer didn't copy any Variations past the first.
    • Fixed bug: Occlusion would stop raycasting if occluded for more than a couple seconds. Couldn't restore non-occluded sound.
    • Fixed allocations in Chained Loop code.
    • Fixed warning with Multiplayer Mirror integration.
    • Fixed bug with StreamAssets and Bulk Audio Importer (crash).
    • Fixed bug where EventSounds OnEnable event wouldn't play a sound on first frame.
    • Fixed bug where SongEnded event would no longer fire on PlaylistController.
    • Fixed obscure bug with unpause on PlaylistController causing the music to stop.
    • Fixed bug in Unity 2021 where Bulk Audio Importer spammed errors on scanning.
    • Fixed bug in EventSounds where Playlist events wouldn't play during OnEnable. Now they play during "Start" instead if so configured, since PlaylistController is ready by then.
    • Fixed bug where Playmaker Custom Actions would spam the Console when editor stopped or Scene unloaded sometimes.
    • Fixed asmdef files package so that they only work in the editor.
    • Added integration with all Opsive plugins!
    • Changed Voices / Weight label to have a slash instead of parentheses. Clearer purpose.
    • Changed "Song Start Time Mode" on songs in a Playlist to "Begin Song Time Mode".
    • Added "Multiplayer Capability" checkbox to the Welcome Window, off by default. Check the box to get multiplayer versions of Event Sounds, and the MechanimState scripts.
    • Added new asmdef packages for users using Addressables and asmdefs. The existing ones didn't compile if you turned on Addressable support.
    • Added ability to specify a Custom Event to fire at the end of fades/pitch glides in Event Sounds for: Pitch Glide in "Play Sound", Sound Group Fade To Volume, Sound Group Glide By Pitch, Bus Fade To Volume, Bus Glide By Pitch.
    • Added missing "Use Clip Age Priority" checkbox to Dynamic Sound Groups.
    • Added "Section" option for "Begin Song Time Mode" for Songs in Playlist Controller. This allows you to set a loopable section of a song. You set the start and end time in seconds.
     
    Recon03 likes this.
  31. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    Thanks for the upgrade. ( I don't use multi player version I own it, but I used the other version, which I use in multi player games for a long time, so Thanks for the free update.
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you for the support!