Search Unity

[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. Ross_S

    Ross_S

    Joined:
    Jul 10, 2012
    Posts:
    29
    Hi folks,
    I'm wondering how you best recommend we make a MUTE function in our game? I know there's Mute Bus and MuteEverything commands but they don't quite work as we need. For example if you call MuteEverything and then you enter a new scene and a looping ambience should start and then halfway through that scene the player decides to Unmute the game - play hasn't been called on that sounds.
    What we would like is something that is simply the equivalent of turning the volume to 0 on all sounds.
    I've tried setting volume to 0 for all buses but again this seems to interfere with whether or not sounds actually get started.
    thanks.
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Ok then you can set the MasterVolumeLevel and PlaylistMasterVolume to 0.

    That's:
    Code (csharp):
    1.  
    2. MasterAudio.MasterVolumeLevel = 0;
    3. MasterAudio.PlaylistMasterVolume = 0;
    4.  
    All API can be found on the website here: https://dl.dropboxusercontent.com/u/40293802/DarkTonic/MasterAudio_API/Index.html
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Master Audio V 3.5.7.4 will be live in 20 minutes. Lots of small issues are fixed! Changelog:

    • Fixed bug with SoundGroupAttribute when no Master Audio prefab is in the Scene and you hit Play.
    • Fixed bug with Playlist Controller that's muted playing audio when the Scene changes.
    • Fixed bug where "Mechanim State Changed" sound wouldn't work after you disabled the Game object and enabled it again.
    • Fixed bug with Dynamic SGC existing bus, when the bus is missing.
    • Fixed bug with EventSounds component unable to unregister itself from Custom Event Listeners when the Master Audio game object gets destroyed by a Scene change.
    • Fixed bug where negative volume settings (Variation random volume) would display NaN for volume when using "display dB for volumes" option.
    • Fixed more scene changing bugs with Dynamic SGC's.
    • Added ability to turn off Master Audio logo at top of Inspectors. It does function as a navigation back to the Master Audio prefab in the Scene, but some people don't use it.
    • Added separate UI colors for light and dark Unity skin.
    • Added narrow mode as a toggle under the Mixer section. This hides some less important controls and makes Master Audio workable with a "normal width" Inspector.
    • Fixed scene changing bug with DelayBetweenSongs script.
    • Fixed bug where Custom Fading on a Variation would act as if in Chained Loop mode even if it wasn't.
    • Added a red error in the Console if you try to call any Playlist Controller method before it has initialized itself. The message will explain how to get it to work properly.
     
  4. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    We got compile errors after installing this Update :( here's the log:

    logerror.png

    We're using Unity v4.3.4f1
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Delete that file, and AudioCalcEvent.cs as well. Those were removed 2 updates ago. Every time you update, it's best to first delete the DarkTonic\MasterAudio folder, then this sort of thing can't happen :)
     
    Teku-Studios likes this.
  6. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Loving the asset so far but I have a bit of a problem. I am using the new unity UI system and have attached button click sounds using master audio. The problem is the volume of the UI elements are all over the place. My camera is set as my Audio Listener.

    I am using both "In game" style menus (as in they are part of a billboard in 3d space and close to the camera) and 2d screen overlay style menus. The In game menus and buttons have the proper volume level. The on screen overlay menus and buttons are too quiet to hear unless I turn the volume up to massive levels (how I realized volume was the problem in the first place).

    I know I can attach the sound to the caller (the window or button), the caller location or to master audio but none of those are where the sound needs to be (close to the camera). The camera itself moves so I assume I cannot parent the Master Audio Prefab to it.

    What do I do to fix this?
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I usually have *all* GUI sounds set as 2D so it's not a problem about the distance. I think that's fairly normal practice. Aside from that, not much you can do given the placement of your Audio Listener.

    We don't support scenarios of using the Master Audio prefab as a child of anything, but you're welcome to see if it "just works".
     
    Last edited: Feb 24, 2015
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Master Audio is back to the full price of $45.
     
  9. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    I am trying to get my setup to persist across scenes, fade out and stop in certain scenes, and carry on playing in others. How do I go about this? I have enabled MasterAudio to persist across scenes, and this means my initial playlist will play throughout all, but the rest I am unable to figure out. I have used SoundManager Pro in the past and this was incredibly easy to setup, so I am wondering whether I should switch back to that, or if I am missing something? I didnt think it would be this hard to get it working...
     
  10. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Also, how do I know what playlist is currently playing? I see I can start, pause and resume a playlist, but if I call StartPlaylist in one of my scenes, and return to it, I get an error in the console...
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Well #1, I wouldn't recommend to switch back to a basically unsupported plugin (SMP). If it was easier to do certain things with that, that's mainly because that plugin can do only about 10% of what this plugin can do. For example, it only supports playing a single music track at a time. Ours comes with a 54 page readme. By the way, we have a very large number of users who left SMP because it was so limited and so much code had to be written where our plugin pretty much does it for you in most cases. It looks like SMP is now a free product because it doesn't integrate into Unity 5 (with the new audio mixer) at all. Meaning it's of pretty limited usefulness once Unity 5 comes out. However, if you prefer, you can always use SMP only for music and Master Audio for sound effects. As I said there are far less options going that way though.

    To do all the things you asked about, you can place an EventSounds component on an empty game object in each Scene, use the Start event, Playlist Control group, and pick Commands like "Fade Playlist", etc to do all that. Requires no coding.
     
    Last edited: Mar 2, 2015
    mimminito likes this.
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    What does the error say in the Console, including line numbers? How many Playlist Controllers do you have? Each Playlist Controller can host 1 Playlist at a time. Quite sure I've done this myself and didn't get any errors.

    There is a property of PlaylistController called CurrentPlaylist.
     
    Last edited: Mar 2, 2015
  13. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Thanks Brian. I would much prefer to use this asset, I actually switched over from SMP to this plugin recently as I got in it in sale a while back, and its feature set is incredible compared to any other asset out there. I would love to carry on using this, its just time is a matter of urgency here so I need to get it working asap.

    I think I have it working now, I will try and get the error for you later. Is it ok to PM you with queries on here?
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Of course. Or you can always email us at support@darktonic.com.

    Thank you.
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Define "does not work" please. Do you see the LED's on the mixer light up when sounds are played and just don't hear anything?

    In Unity versions prior to 5, the 2d / 3d setting was on the Audio Clip's settings. Now it's on the Audio Source instead. Setting your Spatial Blend Rule setting (there's a separate one for Mixer and Playlists) is probably what you need to do to get it audible again. By default it's set to 3d for all Sound Groups and 2d for music. I would bet your sounds were previously 2d, now 3d and therefore not audible based on the min/max distance settings in the Audio Sources. Changing the Spatial Blend Rule for the mixer to "Force all to 2d" will get it back to normal.

    Your music, since the default Spatial Blend Rule for Playlists is 2d, should still work when you hit play. Previewing may not work though for both while in edit mode (we will fix this soon).

    If it's something else, let me know.
     
    Last edited: Mar 4, 2015
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Yes, if they use 2d effects, they will :)
     
  17. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    Hi Brian,

    I'm getting the error below. Set PlaylistController.cs to execute first. Commented out all MasterAudio.* calls in my code, but the error is still there. Any suggestions on how to fix this? Thanks!

    Playlist Controller is not initialized yet. It must call its own Awake & Start method before any other methods are called. If you have a script with an Awake or Start event that needs to call it, make sure PlaylistController.cs is set to execute first (Script Execution Order window in Unity).
    UnityEngine.Debug:LogError(Object)

    PlaylistController:DuckMusicForTime(Single, Single, Single) (at Assets/DarkTonic/MasterAudio/Scripts/Utility/PlaylistController.cs:766)
    MasterAudio:DuckSoundGroup(String, AudioSource) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1707)
    SoundGroupVariationUpdater:playSoundAndWait() (at Assets/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariationUpdater.cs:205)
    SoundGroupVariationUpdater:WaitForSoundFinish(Single) (at Assets/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariationUpdater.cs:116)
    SoundGroupVariation:FinishSetupToPlay() (at Assets/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs:308)
    SoundGroupVariation:play(Nullable`1, Single, String, Single, Single, Nullable`1, Transform, Boolean, Single, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs:274)
    MasterAudio:playSoundIfAvailable(AudioInfo, Vector3, Single, Boolean&, Nullable`1, AudioGroupInfo, Transform, Boolean, Single, Boolean, Boolean, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1686)
    MasterAudio:playSoundAtVolume(String, Single, Vector3, Nullable`1, Transform, String, Boolean, Single, Boolean, Boolean, Boolean, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1469)
    MasterAudio:playSound3DFollowTransform(String, Transform, Single, Nullable`1, Single, String, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1066)
    MasterAudio:Awake() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:679)
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Good find! Here's the fix (will be in next update).

    Add these 3 lines as the first part of DuckMusicForTime method in PlaylistController.cs (at line 765).
    Code (csharp):
    1.  
    2. if (MasterAudio.IsWarming) {
    3.    return;
    4. }
    5.  
     
    username132323232 likes this.
  19. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    444
    That worked perfectly. Thank you!!!
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    No problem.
     
  21. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    Hi!
    I bought Master Audio some months ago, and today the project was finally ready to be built for XBOX ONE.
    (Unity 5.0.0f4)
    But once pushed build button I saw a bunch of compile errors coming up...

    https://www.dropbox.com/s/9cmgt73pqcxispo/MasterAudio_XboxOneCompileError.jpg?dl=0

    ..maybe MasterAudio is not compatible with that platform?..or I'm just doing something wrong?

    P.S. of course it's error free if launched from Editor.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I fixed that error a couple versions ago, you need to upgrade Master Audio to the latest. Let me know if that works for you. Master Audio is compatible with *all* platforms.
     
  23. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    444
    Hello,

    I am trying to create an RPG type game,
    where there will be lots of scene changing with a playlist of their own on each scene.
    changing scene will cross-fade each scene's current playlist to the other.
    (Ofcourse, the background music will be persisting when loading the other scene.)

    What is the best way to do this with Master Audio?

    I tried to use the dynamic playlist creator, but I barely understand on how to use it.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Normally there's no need to use Dynamic SGC for music only. In most cases you should put *all* songs into one Playlist (in the Master Audio prefab) and make all songs Resource files. That way no audio memory is taken for songs not playing or about to play.

    So - Scenes don't need their own playlist most likely.

    There is a video showing the Dynamic SGC if you haven't watched it.
     
  25. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    444
    Hmm, but my songs consist of 2 parts.
    Intro - 1 song
    Looping - 1 song.

    The song plays the intro, then continuously plays the loop forever until the scene changes.
    It is working very well, until I try to figure out how to change playlist for every scene with the intro and the loop.
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I don't see a problem with using a single playlist for that. You can just add an EventSounds script that plays the intro song by name in each Scene, using the Start event.

    Either that or you can add a temporary Playlist with the Dynamic SGC. But you'd still need to use EventSounds or custom code to start the first song playing, so that seems like overkill.
     
  27. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    444
    That totally makes sense, since the playlist plays in order.

    I don't know why I totally missed that method #1, even if its so simple. :eek:

    Thanks for the help!
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    No problem.
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    You might have more than one version of Unity installed so Unity isn't sure which program to open them with, hence the weird icon. You should still be able to open them by importing a custom package from the Assets menu and browsing to that folder. It works for me.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    At this point I am wondering if you can open any package file at all. Please confirm with a package in a different plugin you own. I doubt I can do anything about your issue as the packages seem to be working for everyone else.

    I would also suggest you reinstall Unity 5.

    When you say importing the package didn't work, you didn't mention what happened when you tried...
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I would rather solve your problem permanently than do a 1-off fix and have you run into the same problem with something else tomorrow.

    Your Pic 4 is scrolled too far so I can't see what's in the "DarkTonic/MasterAudio/3rd Party Plugin Integration and Previews" folder.

    I can confirm that there is a file "MA_PlaymakerActionsAndScene.unitypackage" in that folder because you can actually see it on the Asset Store page for Master Audio: https://www.assetstore.unity3d.com/en/#!/content/5607

    If the file doesn't exist after importing there's some sort of hiccup on the Asset Store server. I just tested importing the package in a new project with Unity 5 and I indeed have the file.

    Here's the package, but I still suggest you uninstall and reinstall Unity 5 and see if it fixes the problem. I did that last week when I had the same "weird icon" problem. I don't want you having to ask for the package every time it's updated.
     

    Attached Files:

  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    It does work for me and no one else has reported this issue. We have over 5,000 users so I'm pretty sure it's something specifically messed up on your computer, but I'm not sure how to solve it more than what I already suggested :|

    I don't think there's anything different I need to upload to the Asset Store for this.

    Hopefully you don't have similar issues with other packages contained in other plugins you bought, but I think you will.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,212
    Voted!
     
    jerotas likes this.
  35. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Have you also posted it on the forums? Sometimes, doing that is way more effective than creating a Feedback ticket.
     
  36. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    hey im getting this error as well, i tried the fix u suggested to the guy but it didn't remove this.
    I also commented out any masteraudio code in my scene. Does a custom event setting persistent settings music volume to 0 count as a playlist controller method? Cause that's the only code in my entire scene that even relates to master audio.

    The game works in editor fine even when error pops up, the custom event works.

    Playlist Controller is not initialized yet. It must call its own Awake & Start method before any other methods are called. If you have a script with an Awake or Start event that needs to call it, make sure PlaylistController.cs is set to execute first (Script Execution Order window in Unity).
    UnityEngine.Debug:LogError(Object)
    PlaylistController:UpdateMasterVolume() (at assets/plugins/MasterAudio/Utility/PlaylistController.cs:791)
    MasterAudio:set_PlaylistMasterVolume(Single) (at assets/plugins/MasterAudio/Singleton/MasterAudio.cs:4403)
    PersistentAudioSettings:RestoreMasterSettings() (at assets/plugins/MasterAudio/Singleton/PersistentAudioSettings.cs:145)
    MasterAudio:Awake() (at assets/plugins/MasterAudio/Singleton/MasterAudio.cs:711)
     
  37. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    and if setting music volume does interfere with the playlist... how are we supposed to implement automatic muting of music based on saved settings at the start of a scene?

    the only way i see is using persistent master audio manager... checking in my no audio splashscreen scene whether saved settings say to mute music and just mute it in my splashscreen scene... then i don't have to do any checks in Start() in my scene with the playlist...
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Got a link to where I should post it?
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I believe I fixed this error last week, just never uploaded a new version. Stand by and I'll get the latest to the Asset Store.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Master Audio V 3.5.7.5 will be live in 20 minutes. Changelog:
    • Master Audio Clip Manager now shows .aiff files as well.
    • Fixed bug when the first Sound Group if configured as a ducking sound would log an error in the console.
    • Fixed bug with PersistenAudioSettings.MusicVolume getting set would fail on Scene restarts.
    • Fixed bug where multiple Syncrhonized Playlists starting in a Scene would sometimes log an error in the Console.
    • Added Toggle (uGUI) to EventSounds.
     
  41. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Hi Brian,
    I've group of playlists in my project and clips are loaded in resource folder. Everything is working but I'm little confused about new "preload audio" checkbox in Unity5. Shoud it be checked or unchecked when using Playlists with resource file setup?

    Thanks!
     
  42. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    The 'Audio' dedicated forum should be the best place for your suggestion:

    http://forum.unity3d.com/forums/audio.74/

    Unity devs are very active there.
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I actually haven't messed with all the new Audio Source settings (except the ones that route to the mixer and Spatial Blend). We just converted our upcoming game to Unity 5 so I will be learning it soon :)
     
  44. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    I've just noticed that my custom event receivers don't work if the custom events are created in a DynamicSoundGroupCreator when Unity enables the creator object after the receiver object. Looking at MasterAudio.AddCustomEventReceiver, I see that it only looks at events that have been created. Is there any technical reason why it can't add the receiver for events that don't exist yet (other than the fact that the handled events aren't available through ICustomEventReceiver, obviously)?

    Edit: If I make changes to expose the events in the receiver and add them before they exist, everything appears to work properly once the dynamic events are created.
     
    Last edited: Mar 12, 2015
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    I'll take a look this evening. Send me your changes so I can see if they're optimum please.
     
  46. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    Thanks, Brian. I sent you a patch file with the changes.
     
    jerotas likes this.
  47. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    just fyi, update fixed the problem.
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,106
    Awesome, thanks for letting me know.
     
  49. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Ok, thanks! Let me know what you find out;)
     
    jerotas likes this.
  50. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    579
    MasterAudio doesn't unload sound when leaving a scene anymore.
    I have the a bootstrap scene with an empty MasterAudio instance.
    In each scene I have one or more Dynamic Sound Group Creator flagged with Auto-create and Auto-remove to true.
    But every scene I load the sounds are added but never removed. This was not happeining some versions ago (I didn't update for a while)
    Please help. I need a patch asap.
    Thanks.
     
unityunity