Search Unity

  1. 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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[20% off!] 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,125
    I've fixed both of these now and the next update will contain the fix. If you want the fix earlier, email us at support@darktonic.com with the PDF of the invoice you purchased the plugin with and I'll Filemail it to you.
     
  2. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! If I create sound like this:

    MasterAudio.PlaySound3DAndForget("MeteorFallingLoop",meteorShowerPrefab.transform,true);

    I do not have reference to it. But sounds is looping. And I want to stop it, once the object it is attached to, gets destroyed. Is there a way to get reference to this sounds and stop it when I need to?
     
  3. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    Call MasterAudio.PlaySound3DFollowTransform instead and use the return the value to hold on to the played sound.
     
  4. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Thanks! Actually, I've just founded 'StopSoundGroupOfTransform' inside API, and maybe that was the one I was looking for.
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Yes, that works. Or it you are ok with stopping all of that sound, then it's MasterAudio.StopAllOfSound();
     
  6. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39

    Changing INNER_LOOP_CHECK_INTERVAL to 0.01f improved the quality a bit, but it's still not as good as with Unity native audio. The clip I'm using is normal 16bit, 48KHz stereo wav, set as 3D sound and loaded in memory.

    For the Mike's suggestion, I have no idea what I have to do to test it (should I put something in some script to get id with GetInstanceID and then use some other method to set it for MasterAudio as a ListenerID? Any example?)

    Br,

    - Moopi
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Mike can answer that question, but your suggested code sounds correct. He actually sent me the code for a specific scenario his game had and I just put it in. As far as it being "not as good as with Unity native audio" - Master Audio uses Unity native audio. It's just an Audio Source with an Audio Clip in it under the covers. We haven't encountered this issue ourselves. Do you have a project you could send us to reproduce the issue?
     
  8. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    If you want to try this, in the Awake or Start script for your player game object, just add MasterAudio.ListenerID = gameObject.transform.root.GetInstanceID(); Alternately, you could use the transform/instanceID of your main camera. I don't know if it will work for you or not based on your example. It was a problem in our game because we have the listener attached to the player in the world so I had to tell MasterAudio to update the playing sound and the listener in sync.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Right, thanks Mike!
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Master Audio V3.5.3.6 will be live in about 20 minutes. Changelog:

    • Fixed bug where short Playlist songs of "from beginning of new song" Song Transition Type would sometimes not start at the beginning.
    • Fixed bug where playing a queued song in a Playlist would lose track of which songs were played and cause the wrong song to play afterward.
    • Fixed bug where triggering a song in a Playlist would lose track of which songs were played and cause the wrong song to play afterward.
    • Fixed bug where top-to-bottom setting with "refill after inactive time" could cause erorrs and sounds not playing if any Variations weren't played when it refilled.
     
  11. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks jerotas, that basically sums it up. One thing to add - both the free and the paid package include a new, simplified version of the Delay component (the paid version still contains the original, more fully-featured version as well). SimpleDelay doesn't feature the panning options, but allows for you to measure delay-time in milliseconds instead of beats per minute. The goal was to make it as quick and easy to use as possible.
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    That's cool, thanks for the clarification.
     
  13. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    One more Time.timeScale = 0 problem

    When the user presses the pause button, my game controller class makes the Time.timeScale = 0

    The problem is: Just after the user pauses it, all of the sounds that were attached to a gameObject are being detached.


    In summary, I make the time.timeScale = 0, all of the attached sounds (played with PlaySound3DFollowTransform) are being detached from their gameObjects.

    Do you know what may be causing this strange behaviour?
     
    Last edited: May 18, 2014
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    They aren't really ever attached, they just follow. They always remain in the hierarchy under the Master Audio prefab. So I don't understand the problem exactly. What do you mean by "they are being detached"?
     
  15. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    Sorry, what I meant is that they stop following the gameObject when I put timeScale = 0
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    So you actually have things that move during zero timescale? Seems weird to me. Please clarify.
     
  17. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    Okay, sorry again for the really bad explanation. English is not my native language, I mess things up quite a bit.

    What I meant is that I execute PlaySound3DFollowTransform, and the sound is following my desired game object just fine. But when I pause the game (timescale = 0) and then I unpause it (timescale = 1), the sound is not following the game object anymore.

    And that's it.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Ok, got it. I'll see if I can reproduce the error and fix it. Thanks!
     
  19. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    There's one more detail that might influence your tests. The pause mechanic is executed along with MasterAudio.PauseBus("busName") and the unpause mechanic execute the MasterAudio.UnpauseBus("busName"). And the sound that stops following the game object belong to that bus.
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Ok, thank you for that info.
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Yeah, it's the PauseBus command that causes this behavior. What actually happens is that when you "unpause" a sound, it does nothing but play the clip. All the other CoRoutines have ended as a side effect of the pause (for following / fading / etc). So if you need to follow the Transform again after a pause, you'll need to play the sound again the normal way. - don't use Unpause. I took a look at the code and there doesn't seem to be a good way to fix this without causing other bugs.
     
    Last edited: May 21, 2014
  22. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    118
    I just imported MasterAudio, clicked scan project for sfx, and now my Unity Editor freezes completely every time I open audio clip manager. I have 10k sfx in my project, I realize this is a lot - they come from imported sfx packs from assets store, but one of the main reasons I bought this is to be able to batch edit my audio clips, and that fetaure is useless when Editor is completely frozen.
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Yes that would be useless. I've tested with about 1,000 clips and it was still responsive. I'll take a look with more.
     
    Last edited: May 24, 2014
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Ok, fixed the issue! Master Audio V3.5.3.7 will be live in 20 minutes. Changelog:

    • Fixed bug where a warning would be shown every 2 seconds if you have no playlist assigned to a Playlist Controller.
    • Made ActiveAudioSource property in PlaylistController a public property.
    • Fixed Clip Manager window to work with thousands of clips. Added paging.
     
  25. hexdump

    hexdump

    Joined:
    Dec 29, 2008
    Posts:
    439
    Hi!,

    I have some problems with Master Audio:

    1) SFX in my game are played on Desktop but not on mobile (android)
    2) I need to remove the number of sounds of the same kind that can be played at the same time (by default just one)

    Thanks in advance.
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    We have used this in an Android game and had zero problems, as have many of our customers. You might try turning on "log all sounds" and reading the ADB Logcat logs and see what it being logged by Master Audio on the Android device. That's the only way I know to troubleshoot Android builds. I have no idea what could be going on though :|

    I'm not sure what you mean by "remove the number of sounds of the same kind that can be played at the same time". Do you want play more than 1 at a time? Use the weight property to adjust that, which defaults to 1 for each Sound Group Variation.
     
    Last edited: May 24, 2014
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Master Audio V 3.5.3.8 will be live in 20 minutes. Changelog:

    • Note: this setting will need to be turned on if you require Timescale zero code to work. Added "ignore time scale" option in Master Audio advanced section. Defaults to off. Performance and garbage collection on lower-end devices can suffer some for turning this on, so only use it if you need to.
    • Added "start time (seconds) to Playlist songs. Defaults to zero. Only available in Song Transition Mode "new song from beginning".
     
  28. kreischweide

    kreischweide

    Joined:
    Jan 2, 2013
    Posts:
    7
    Hi,

    I've just encountered a very strange bug in the latest version of the MasterAudio asset:

    I'm using a Audio Group "Fire" with a 0.4s short wav clip and set it to a weight of 12. Then I choose Replay Limit Mode "Time Based" and 0.1s. Triggering this will just do nothing or sometimes effects between 1-3s. Looking at the code I see that you used Time.realtimeSinceStartup for capturing the last trigger time, but compare it to Time.time for the replay. There seems to be a strange difference between them. If I change

    _group._lastTimePlayed = Time.realtimeSinceStartup;

    to

    _group._lastTimePlayed = Time.time;

    the replay mode works just fine. Maybe its my machine, just checking with you :)
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Good catch, I'll make the change, that makes sense! Although I'm going to go with "realitimeSinceStartup" for all instances. That makes more sense for persistant mode MA.
     
    Last edited: May 26, 2014
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Heads up, we will be moving our default folder into the Plugins folder so that JavaScript users won't need to move things.
     
  31. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Updated to Unity4.5 and getting a ton of Master Audio errors with the playmaker actions. My playmaker is up to date...
    Examples:

    Assets/DarkTonic/MasterAudio/PlaymakerCustomActions/MasterAudioBusFade.cs(5,2): error CS0246: The type or namespace name `Tooltip' could not be found. Are you missing a using directive or an assembly reference?

    Assets/DarkTonic/MasterAudio/PlaymakerCustomActions/MasterAudioBusFade.cs(5,2): error CS0104: `TooltipAttribute' is an ambiguous reference between `UnityEngine.TooltipAttribute' and `HutongGames.PlayMaker.TooltipAttribute'
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Thank you for reporting this, I hadn't upgraded yet. I'll download Unity 4.5 and get this fixed ASAP.
     
  33. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Negative, sir. I've installed Unity 4.5, the newest Playmaker and a fresh copy of Master Audio with the Playmaker actions. I get zero errors in the console. I believe you don't have the very newest versions of the MA Playmaker actions. Please delete the Master/PlaymakerCustomActions folder and open the MA_PlaymakerActionsAndScene package again. Pretty sure those errors will go away.
     
  35. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Ok thanks, i'll try that tomorrow
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    No problem.
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    False alarm, actually we're not going to move the plugin into the "Plugins" folder. It causes other problems with DF-GUI for example when you install the optional package for it. I would like to move it, but it's not worth the trouble for the smaller amount of JavaScript users unfortunately :(
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    A couple fixes. Master Audio V 3.5.3.9 will be live in 20 minutes. Changelog:

    • Fixed inconsistency with time retrigger limit in Sound Groups. It was using different time variables. Now they're all the same.
    • Huge increases to performance of AudioUpdater (optional component).
     
  39. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    SNIP.


    Nevermind, the DLL was compiled for .NET 4 and for some reason my own code never triggered the compiler error (but Master Audio did). Recompiled the DLL for 3.5, now it seems to work.
     
    Last edited: Jun 2, 2014
  40. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    127
    Are any Master Audio users still on Unity 3.5.7?

    If so, why haven't you upgraded?
     
  41. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    127
    I'll take the silence as a good sign :)
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    I think we're about to reverse our music advice in the ReadMe. At least within the Unity editor, using multiple streaming audio clips in a Playlist seems to take up large chunks of memory for each clip (even when they're not playing). I'm not sure if this is true on target devices (iPad etc) and there are known Profiler bugs with the Unity audio profiler. However, setting up all songs as Resources and non-streaming (streaming doesn't work with Resources anyway) should save you quite a bit of RAM if you have more than a couple songs in your playlist.

    If anyone can run profiler (not on Unity 4.5 - see below) on a target device and let me know if it's still true there, it would be appreciated. My profiler never connects to my iPad for some reason.
     
    Last edited: Jun 6, 2014
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Also take note that the Unity 4.5 Profiler audio section is pure crap. It reports 200 Audio Sources and 54.6 Mb Audio memory usage on a test scene with 1 Audio Source whose clip is 0.1 Mb. So don't believe anything it says. I'm going to file a bug report this evening.
     
  44. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,617
    I bought this a few months back, the few times I got to use it, I always get errors I get them before I even get to use it.. Which always is 95 errors

    757 Default parameter specifers no permitted.
    there are ton of others with the same error events sound script and Master Audio

    I'm using 4.5 and everything is updated.

    AS I said I had similar errors before, have a project due tomorrow for school, so I love to use this asset but I get to many errors before I can even use it.... All the time.. Please let me know what I CAN, do.

    Thanks
     

    Attached Files:

  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    I don't know what that attachment is supposed to show me. It's not useful. Can you paste a couple of the errors into the thread here so I can get an idea? We haven't had any reports of what you're saying. Have you tried deleting the entire DarkTonic and Master Audio folders and re-importing from the Asset Store?
     
  46. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I updated to 4.5 and then updated the asset and playmaker package, thanks! that fixed all the errors, except I'm getting this one.
    Any ideas?

    Assets/DarkTonic/MasterAudio/Scripts/Settings/DynamicSoundGroupVariation.cs(14,36): error CS0426: The nested type `AudioLocation' does not exist in the type `SoundGroupVariation'
     
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Well you somehow have a (maybe older) version of DynamicSoundGroupVariation. Indeed AudioLocation is not in SoundGroupVariation but in MasterAudio.cs.

    I think you'll need to delete your entire DarkTonic & MasterAudio folders and reimport the latest from the Asset Store.
     
  48. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    ok thanks, I'll try that
     
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Master Audio V 3.5.4 will be live in 20 minutes. Changelog:

    • Please delete and re-add any playlist songs that have Resource files. Fixed bug where creating Resource file playlist songs keeps the clip reference. This would use extra memory unneccessarily.
    • Fixed bug where selecting folder filter in Clip Manager showed items in subfolders.
    • Fixed bug where dragging Resource clips into playlist makes you do it twice for each song.
    • Fixed bug where dragging multiple Resource clips misses adding some to the playlist.
    • Added ChangeVariationVolume method to compliment the existing ChangeVariationPitch method.
     
  50. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    340
    Just installed your plugin, it looks great!

    Couple of questions:

    1 - can you do crossfading between scenes?
    2 - in my screenshot, is that the correct way to set up a background sfx?
    3 - in this same game object in the screenshot, I plan to add a variation to the sfx, but this variation is based upon a condition being met, so is the 'Variation Mode the correct way to do it?

    Thanks

    Screen Shot 2014-06-08 at 9.33.49 PM.png
     
unityunity