Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Master Audio - AAA Sound Solution. #1 audio plugin on Asset Store!

Discussion in 'Assets and Asset Store' started by dark_tonic, Jan 28, 2013.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    It's done and in the version I will be submitting next, probably tomorrow.
     
    castor76 likes this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    V 4.1.3 changelog:
    • Fixed bug: with Loop Playlist off, last Resource file doesn't get unloaded at end. No code to detect this.
    • You now can drag a folder containing 1 or more Audio Clips into the "Drag Audio Clips here" boxes. It can contain other things too - only the Audio Clips will be processed in bulk.
    • Added code to restore a slider's value during Awake if it has been used in Event Sounds to set Persistent volumes (music / mixer / group / bus). Now you don't have to write that code.
    • Added new Log field of "Log Out Of Voices" in Advanced Settings. This is on by default. Will tell you when you run out of voices for the Bus / Sound Group / polyphony limits and other limits if turned on.
    • Made "Disable Logging" shut off the non-important (info) logging as well.
    • Removed "Variation Fading" option in Advanced Settings. Always does a stop if you "Fade Early" a Variation.
    • Added a configurable fade time when stopping Variations from Stop Oldest option on the Bus. Default is 0.3 seconds. Settable from 0 - 1 second under Advanced Settings / Fading.
    • Random volume and pitch settings are now heard through preview in edit mode.
    • Added UFPS integration package.
    • Added SongLooped event to PlaylistController.
    • Added ability to play a Custom Event from Crossfade Start, Playlist Started, Playlist Ended & Song Looped on Playlist Controller.
    • Updated all Inspector links to new domain (Dropbox is gone).
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Attention: Dropbox is dropping support for public links, so we have moved everything (API websites, documentation, downloads) to our new domain www.dtdevtools.com. All our plugins have a new version published with updated links. Please download the latest so as to avoid any dead links. This is important for Master Audio especially, since they help links in the Inspector will be pointing to Dropbox until you update.

    Thank you for your support!
     
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,927
    Excellent. This is why I buy assets from him. You can expect excellent continuous support from him. It's the reason why I got PoolBoss from the same author! support this dev!
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Thank you for your support! The version doesn't look like it's live now, stuck in pending...will email the Asset Store.
     
  6. Green-Sauce-Games

    Green-Sauce-Games

    Joined:
    Mar 27, 2014
    Posts:
    69
    I'm having tons of crash reports when Pausing MasterAudio before showing Ads.


    NullReferenceException: Object reference not set to an instance of an object

    Code (csharp):
    1. DarkTonic.MasterAudio.AudioUtil.AudioClipWillPreload (UnityEngine.AudioClip clip)
    2. DarkTonic.MasterAudio.SoundGroupVariation.Pause ()
    3. DarkTonic.MasterAudio.MasterAudio.PauseSoundGroup (System.String sType)
    4. DarkTonic.MasterAudio.MasterAudio.PauseMixer ()
    5. DarkTonic.MasterAudio.MasterAudio.PauseEverything ()
    6. HeyzapAdsControl.<HeyzapAdsControl>m__2 (System.String network, System.String callback)
    7. Heyzap.HeyzapAds.SetNetworkCallback (System.String network, System.String callback)
    8. Heyzap.HeyzapAds.SetNetworkCallbackMessage (System.String message)
    Any advice on how to avoid it? I'm using the most recent version on Unity 2017.1. It seems to only happens on Android Devices.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    There's only one line of code in AudioClipWillPreload and it's a Unity API:
    Code (csharp):
    1.  
    2. return AudioClip.preloadAudioData;
    3.  
    Sounds like you may have an empty clip there? Try going into AudioUtil and changing the code of AudioClipWillPreload to this instead:
    Code (csharp):
    1.  
    2. return clip != null && clip.preloadAudioData;
    3.  
    That should fix it. Let me know and I will include it in the next update.

    It currently doesn't check for null. I'm adding that null check.
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Master Audio Multiplayer is on sale for only $30 (same as upgrade price from Master Audio)! Not sure how long this sale is on, but a great time to pick it up for very cheap. It's the ONLY multiplayer audio plugin for Unity, period. But yeah it's good.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    V 4.1.4 hopefully will be live in about 20 minutes. Changelog:

    • Fixed bug: Firing a Custom Event from a DynamicSoundGroupCreator didn't work when changing to a new Scene where that DGSC lives.
    • Potential breaking change: Updated Playmaker Custom Action "Fire Custom Event" to allow use of a variable for the Game Object. If you were using this action, your previous "origin" will be lost since the variable type is now different. You will need to set it again.
    • Added ability to MechanimStateSounds to be able to retrigger the "timed to animation sounds" every time the animation loops but the Mechanim State is not exited.
    • Added all the timed to animation functionality of MechanimStateSounds to MechanimStateCustomEvents script.
     
  10. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,003
    Hi @jerotas

    As per our conversation here's a screenshot.


    MasterAudioSliderSettings.png


    Thanks for all the help.

    For anyone wondering what this is about jerotas is helping me out. For any potential buyers reading this I can totally recommend Master audio based on support and my experiences up to now. I need to leave a review sometime soon.

    doc
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Hmm. I'm not sure what you expect to happen here. That's a bus fade command. You mentioned 4 "profiles" I believe that would have different volumes of each bus or something. And when you select one of the profiles, you have code that sets the volumes, I think. However this slider doesn't register the changes and shows the old volume. Is that all correct?

    If so I would suggest using Action Type of "Persistent Settings Control" and use the Command "Set Bus Volume" instead of the non-persistent Action Type you are using.

    Then you should make sure your profile selection code should be calling the PersistentAudioSettings class methods to set the persistent volumes instead of MasterAudio class.

    If all this is done you will still need to disable and re-enable the game objects of any sliders you want changed. The OnEnable event will look up the current value of Persistent volumes and set the slider's position.
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    I just realized there is no Persistent fade command...so probably no way to do this without you setting the slider value yourself if you want a fade command there. But if I got the scenario wrong above let me know with a full description.
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    It might be possible to add what you want, so please let me know if the scenario is right. I'm not sure if "SliderChanged" event will fire when you set the slider value from code...
     
  14. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,003

    Hi Jerotas,

    Thanks for all the help. It's really aprreciated. Yep. It's as you said. 4 player profiles and when a player profile is loaded it sets the slider values to what was saved by that player in their last save. I've got the code working so all the slider UI values are correct and everything is working there. It's just settings the slider by code is for some reason not triggering the event that the master audio event sounds needs to do it's thing and control the bus audio etc. So the UI sldiers are all in the corect positions etc but the actual volumes are not changed. They only change if the UI sliders are grabbed manually. Really scratching my head with this one. I don't know what message unity UI sends when it's manually changed. If I knew that I'd try and make it send the same message at the same time as changing the slider values by code.

    Thanks
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    That all sounds normal to me. I'm unclear on the problem still....you may need to send me something for me to fully graph what's going on and what you expect.
     
  16. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,003

    Hi again,

    I managed to get it working. I added a simple public method to the Event Sounds script that is used by the load manager for each player profile. The event sounds script may already have a function in there that does the same thing but it was quicker for me to write than look for it:)

    CodeForSliderChange.png

    Thanks anyway.

    doc:)
     
    Last edited: Sep 19, 2017
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Sounds good. I will investigate making this work automatically according to my understanding.
     
    docsavage likes this.
  18. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,003
    Sounds great to me. Thanks
     
    jerotas likes this.
  19. armnotstrong

    armnotstrong

    Joined:
    Mar 3, 2017
    Posts:
    19
    Hi, I destroy the gameobject with just Destroy(gameobject); is there any way to play a sound like boom when this happens, have tried Despawned(Pooling) and Invisible event sounds, both not working. Thanks.
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Despawned only works if you are using a pooling plugin with that event (Pool Boss / Core GameKit / PoolManager) so you must not be. Invisible should work but only if the game object is currently onscreen on a camera and only if that game object has a Renderer component (sometimes Renderer may be in sub-game object). May also not satisfy that condition. So use Disabled event. Game Objects become disabled just before they get destroyed, and I didn't put an event for Destroyed there right? I forget why...maybe I should add it? Can you think of a reason why I didn't? Disabled will also get fired when an object gets disabled without destroying.
     
  21. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    hi, is there a way to use playlist controllers for VR music where the music is split up into several Stems and each stem comes from a different 3D source (ie: so the music sounds like it's coming from all around you with different instruments in different directions). Right now we just do this manually by MasterAudio.PlaySound3DFollowTransformAndForget(.. but would be cool to take advantage of playlist features like shuffle,etc.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Of course, music doesn't have to be 2D, that's just the default. Change the Spatial Blend Rule to 3D in the Master Audio game object Inspector.

    Watch the Synkro video on Youtube to see how to set up stems to be synchronized.

    VR or not (makes no difference) this is how you'd do it.
     
  23. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Hi,
    I watched the video but am unclear about how to start the playlists via code. Here's my setup:

    - I've created 3 playlist controllers, one for each position in the 3D world.
    - I created 3 playlists, one for each stem. I then assigned these playlists to the playlist controllers so that each controller has 1 playlist (ie: for the stem that is supposed to play from that position)
    - I didn't turn on synchronize clips as I read in the docs that it was for play different tracks from the same position. But each music track is supposed to start from the beginning, we don't fade between tracks mid track, we just want to play a random track and make sure that same track is playing on each of the playlist controllers. Then when that track ends we want to play the next track.

    so how do we trigger the music to play via code? Typically we would use MasterAudio.StartPlaylist(...) but since we now have a separate playlist for each stem do we just play any of those stem and all of the other controllers will play their part of the same track? ie: StartPlaylist("stem1")
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    If you are using stems, you must use "Synchronize Clips" or you risk them getting out of sync.

    You will start each of your Playlist Contollers playing their playlist separately, i.e.

    PlaylistController.InstancesByName["ControllerName"].StartPlaylist();

    for each controller. The Synchronize Clips setting will make sure that the 2nd one is timed the same as the already playing 1st one, etc. Yes that could be 3 lines of code in a row but if they are Resource files they may finish loading in different frames (or even perhaps if not Resources), so you need the sync setting.
     
  25. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Thanks for the quick reply!

    Ok, so I've put in 3 lines of code to start each playlist controller, but they are all playing different tracks. I have them set to shuffle mode. I have turned on synchronize clips setting for each controller and also set them to the same controller sync group (although I'm not sure what that does).

    MasterAudio.StartPlaylist("VRPlaylistController-Stem1", "VRStem1");
    MasterAudio.StartPlaylist("VRPlaylistController-Stem2", "VRStem2");
    MasterAudio.StartPlaylist("VRPlaylistController-Stem3", "VRStem3");
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Are all the tracks the same length? They must be for Synchronize Clips. Also, that settings disables auto-advance.

    The sync group is used for Synchronize Clips. It will sync to any other Controller's song position with the same sync group. I'm not sure why anyone would use more than one Sync Group.
     
  27. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    The tracks are all of different lengths as they are different songs that we don't want to synchronize, they will never fade between them just start a new track when one ends.

    The stems (the separated parts of each track, ie: drums, bass, etc..) are all the same length for each track and that is what we would like to synchronize. So that each playlist controller plays it's own stem for the same song.

    Then we just want to use shuffle but make sure that the same track is played on each playlist controller.

    So:
    Playlist controller 1, 2 and 3 all play the same track, each one playing it's stem of that same track. Then when the track ends, shuffle to a random other track in the playlist and each playlist controller play that same new track.
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Ok, so make sure Crossfade Time is set to zero or it will just loop the same song forever (auto-advance is disabled and loop force with >0 Crossfade time in that mode).

    However I don't think that using Auto-advance will work anyway, because you have chosen Shuffle mode. Each Playlist Controller will choose the next random song independently of each other, and most of the time that means they won't be playing stems of the same song.

    Instead, I think you should turn off auto-advance, and hook into the Song Ended event for the Playlist Controllers. When all 3 have fired and no song is playing, write some code to pick a random set of matching stems and play them. I think that's the only way you'll get it to work with shuffle. Note that without auto-advance, shuffle mode doesn't really do anything since your code would be doing the selection of the next random song.
     
  29. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Ok thanks. So sounds like we should probably just go back to playing the music stems as sounds and avoid using playlist controllers as they don't support these features (which was my original question :) We created our own music manager that selected random tracks and set the appropriate music for each of our audio locations.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Sure, if you think that's easier and it does everything you want. Make sure that if you're loading Resource files or other slow loading, the clips from the different stems do synchronize exactly.
     
  31. the-forty-seven

    the-forty-seven

    Joined:
    Nov 12, 2014
    Posts:
    7
    Hi, Can I merge two master audio instances into one at runtime?

    There are many individual mini-games in my project. Each mini game can be played independently, and sometimes two games can be played at the same time. All of them have completely different sound groups and playlist(also audio clips) so I thought each mini game having its own master audio is good for performance and management perspective. I stored every mini games into assetbundles.
    However, the problem is that when I load two mini games from assetbundle at the same time, I have to merge two master audio instances because the master audio is designed in a singleton pattern. It is not allowed that two instances exist in the same scene.

    What is the best way I can do in this situation?
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Use the Dynamic Sound Group Creator prefab, create one from the Master Audio Manager window. With that, you can create per-Scene (or even more granular) Sound Groups, Playlists and everything else, that will get transferred into the Master Audio game object as long as the DGSC is enabled. You could move *everything* into DGSC's and have an empty Master Audio game object. You can use the Sound Group Organizer prefab to move things from MA to DGSC without having to recreate everything (they both use different scripts).
     
  33. the-forty-seven

    the-forty-seven

    Joined:
    Nov 12, 2014
    Posts:
    7
    Sounds great, it's exactly what I wanted. Thanks.
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Excellent. Glad to help.
     
  35. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Hey, I'm trying to use the SongEnded event and I get a Unity crash (5.6.4p1) when OnSongEnded event is called on a playlist controller that has synchronize turned on with other controllers and I manually advance the first controller's track (to test songended) I guess manually adjusting the position of one track while it's synchronized is not something you should do but I just wanted to report it anyways. It probably shouldn't crash unity :)
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Ok I'll take a look, thanks.
     
  37. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Actually, seems like it's crashing Unity even when I don't adjust the track position (time). It worked fine the first time a track ended but then I start a new track on each playlist controller and when that 2nd track ended Unity crashed again. Looks like it goes into an endless loop after the first song ended event is fired.

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)

    Song Ended
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:28)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:StopPlaylist(Boolean) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:677)
    DarkTonic.MasterAudio.MasterAudio:StopPlaylists(List`1) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4943)
    DarkTonic.MasterAudio.MasterAudio:StopAllPlaylists() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Singleton\MasterAudio.cs:4933)
    SkyCityMusicManager:StartVRMusic() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:56)
    SkyCityMusicManager:DelayedStart() (at Assets\Scripts\Managers\SkyCityMusicManager.cs:39)
    SkyCityMusicManager:OnlyPlaylistController_SongEnded(String) (at Assets\Scripts\Managers\SkyCityMusicManager.cs:29)
    DarkTonic.MasterAudio.PlaylistController:CeaseAudioSource(AudioSource) (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:1591)
    DarkTonic.MasterAudio.PlaylistController:Update() (at Assets\Plugins\DarkTonic\MasterAudio\Scripts\Utility\PlaylistController.cs:430)

    (Filename: Assets/Scripts/Managers/SkyCityMusicManager.cs Line: 28)
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Playlist Controllers have a ton of options and I can't reproduce what you're seeing at all. Please modify the Example Scene #1 to break like you're seeing and send it to me so I can see the error in action and hopefully fix it. Or just send me your Scene.

    I do see your script mentioned before each iteration of the endless loop though (SkyCityMusicManager.cs) so perhaps that is the problem? I have no idea what that code does.
     
  39. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    Ok I got it, I was calling Stop Playlists when the song ended event was called which in turn calls the song ended event (even though the song was not playing) I removed that and it works great now.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    We could add a check to PlaylistController.cs, StopPlaylist method, to check the PlaylistState property. If it's Stopped or NotInScene, we can abort the method.

    Would that work for you?
     
  41. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    410
    For me it's okay the way it is, I guess it would be a good safety check :) but I assume I don't actually need to call Stop Playlists if I am about to trigger a new song anyways, because the playlist will just play the new song right?
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Assuming you have zero crossfade, yes.
     
  43. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    408
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Nope. It's definitely a cool feature, but actually I would say that very few people consider it a *must*, seeing as how this is the very first ask we've gotten for it. We have over 6,000 users, which is far more than that product. But that is fairly new to be fair. It's also pretty limited in that it only does that and nothing else.

    I don't actually know how to code that feature or I'd add it to the roadmap. Would you happen to know how to approach it?
     
  45. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    408
    Sorry i'm not programmer so i dont know how to code it. But i think even simple audio zones are must have for autdio system, I mean for example can I with you system play sound along the river, in the same time ambient of birds etc and in teh same time add zone to house itnerior and play there some scarry ambient? I think this is must have in game development I dont know why no one say that before :) It would be grat to see that on your roadmap. Even If your system wont support mesh audio, Audio zone shapes like rectangles spheres etc should be there ;) If not maybe is possible to integrate your system with volumetric audio system? :) buying 2 system is not problem for us But we have to know that it will work together well :) Thanks for reply! P.S Volumetric audio was release in 2014 so 3 years ago it is not too new ;)
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    I'm not sure what you refer to be each of those terms (how do shapes work?).

    But I've added the following to the roadmap, which I think it should be able to do: Put an Audio Source at the closest point in the Mesh to the Audio Listener at all times (updating every frame) - that would basically enable you to do rivers or whatever with a single Audio Source.

    I'm not sure what else that plugin does, but if you could describe it I can see if I can figure out how to do it. As far as integrating with VA, not really possible because that plugin uses Audio Source attached to game objects in the Scene (as does default Unity), but MA doesn't work that way because there are all sorts of problems it leads to. So they are mutually incompatible ways or working with audio. MA has all the Audio Sources in a central location and the follow their "actors" every frame so the audio will come from the right place.
     
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    By the way, I've gotten single collider Audio Source billboarding and closest point positioning working now. Just need to get compound colliders to work also...
     
  48. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    408
    great to hear that, and whats with simple shape zones? I mean for ecample rectangle sphere zone of ambient audio? Can I handle ambient sound when I go indoor outdoor etc? to amke scary ambient for example in the cave and calm birds outside it.?

    hmm so If I have any system if audio source is attached to object? I just have to remove it and connect byt master audio yes? I have one more question, is master audio handling sound stop well? what I mean, I have a menu in game, where I play music, but when menu is opened we use time scale 0, and stop every other sound in time, (for example dialogs because it is important if we close in game menu and back to game sounds will start play from time we stopped it, Also as I mention we use time scale here so In game menu music have to work even if game time scale is to 0. Is it possible to handle such a situation with your system? :) Also could I conect your sounds to unity Mixer without coding?

    last question could I use it in the sae time with other unity defeault source sounds on scene. because I have some other systems for example footstep sound that I dont want to change ;)
    Thanks
     
    Last edited: Nov 12, 2017
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,207
    Any shape is supported, it uses the collider on the same game object (but no sub-game object colliders yet). So that could be mesh / sphere / box etc.

    Our "Ambient Sound" does what you want with inside/outside automatically based on the Max Distance of the Audio Sources and when you come in / out of range with them. Yes, just remove Audio Source from your object and add our Ambient Sound script, done.

    All our stuff works with time scale zero. Yes, you can connect our buses to Unity Mixer, no coding.
     
  50. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    408
    "based on the Max Distance of the Audio" - ok so last question but what If I want t sound go from everywhere in custom zone, I mean in this zone there is sound exactly the same strong outside zone there is no this sound? So will your system stop music/ sound in position after tiem scaling to 0 too? Thank you I think I will buy your system very soon.
     
unityunity