Search Unity

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. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Because all that stuff gets loaded on game start by our bootstrapper and then none of those clips get hit until like 20 seconds in. I can verify in the inspector that they are loaded way before it gets called.

    Should I be able to look at the MA prefab and see that group inside there or does it live in the DynamicSoundGroupCreator prefab for its lifetime?
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It lives in the Master Audio prefab as soon as the Dynamic items are created there (defaults to Enabled event of the DSGC). So you're saying Variation count is wrong at that time?
     
  3. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Hi Jerotas.

    I have a sound group that is looping..

    After I let it play and fade in its volume to 1, all seems ok.. But when I fade it to 0, it doesn't actually seems to stop playing.

    Which is ok, if that is intended behavior. But I sometimes wants to stop it from actually playing so I can free up the playing resource (for performance reason etc...) so my question is..

    1. How do I actually stop a sound group after playing? There doesn't seem to be any obvious usual MasterAudio.StopSoundGroup or something like that.. It only has the one that has transform as its other input.. which I may or may not have any info on..

    2. MasterAudio.FadeSoundGroupToVolume 's delegate.. is this per soundgroup or just global command so if I call this for another soundgroup it will try to trigger it too?

    3. Is there any easier method that I can call so that after it fades to 0 it stops playing for me?

    Thanks.
     
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Also, is there possibility that the inspector editor drawing can be improved in terms of its performance? It's really slow.. and painful to use.. whenever I have MasterAudio selected in the hierarchy, my Unity editor just becomes very slow in terms of interactivity.
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    #1, if you want to use code, it's:

    MasterAudio.StopAllOfSound("Scream");

    #2, it's per Sound Group. Yes you can use a delegate to stop the group after fading is complete.

    However, if you want it to make this change for all Sound Groups globally (always stop a sound when it fades to zero), there's an option for that in Advanced Settings on the Master Audio game object. The subsection is called Fading. There's options for Buses, Playlist Controllers, Sound Groups and Variations. By default these are turned off.

    upload_2015-11-20_21-31-29.png
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not possible unfortunately. I can only suggest to not select it when you don't need to be looking at it. It has to scan all sub game objects every time it refreshes, which can be slow if you have a lot of Sound Groups. That said, we have about 150 Sound Groups in our game and it's not terribly slow. It definitely affects frame rate though.

    I don't think it's the drawing as much as the scanning and GetComponent calls.
     
  7. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Also, is there any way to get the original volume of sound group that I have set in the inspector so I can get it back during game play? This is so that I can fade in the volume to the one that I have adjusted in the inspector instead of just supplying some hardcoded numbers.

    The sound group that I am calling to play can persist between scenes so I don't want to use MasterAudio.GrabGroup(audioName).groupMasterVolume in the beginning of the script to get the value back. The value may have already changed by the other scripts in the other scene.

    And.. (haaha.. asking a lot!)

    Is there method to know if a soundgroup is current fading or not?
    Because there could be chance that after calling fade to volume 1 , fade to volume 0 could be called before the first command finishes... What happens then? does the first fade stops?
     
    Last edited: Nov 21, 2015
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    There's an OriginalVolume property for Variations but not for Sound Groups. I'll add that for the next version (and probably for buses too).

    There's no way to know if the Sound Group is fading currently. If you call another fade while one is already happening, it will cancel the other fade and start the new one from the current volume level.
     
  9. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Thanks. Overriding previous fade operation is ok. I just needed to know if that was the case,.
     
    jerotas likes this.
  10. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    I've bumped into a bug where playlists stop playing if you suspend the app for longer than the currently playing clips duration. I'm using gapless switching, 0 crossfade and a playlist with 8 different clips. Any ideas how to solve this?
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I don't believe any Unity code can run during suspension (although audio can keep playing sometimes), so if the current playlist song keeps playing in the background during suspension, this may be impossible to fix.

    Do you have music continue to play in the background during suspension?

    Also note that as of last month, all bug investigation bug DarkTonic will only be done when a sample Unity project is sent over that demonstrates the bug. So if you have something you can send, that will help.
     
  12. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    No nothing is playing in the background during suspension. I'll just try restarting the playlist when coming back from suspend and see if that solves it. Thanks
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If it's not playing in the background during suspension, then unless it's streaming, the song that was playing when you suspended should still resume playing when you un-suspend, regardless of what happens to the next scheduled clip. Does that happen? Or did the song skip forward the amount of time you suspended? And does the problem exist when gapless is turned off?
     
  14. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    It doesn't play on suspend and I can't really hear if it skips forward when you unsuspend or not but it at least goes quiet. I haven't tried turning off gapless, I'm gonna try pausing the playlist on suspend and resuming it on unsuspend though. I'll let you know how it works out :)
     
    jerotas likes this.
  15. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    I tried pausing on suspend and resuming on unsuspend but that didn't work, still goes silent if you are away for too long. I however noticed that it starts the playlist again after a while, probably when the next clip in the playlist is supposed to start.

    I tried turning off ignore time scale as well but that didn't change anything. I'm guessing gap less switching is the culprit in this somehow. Any ideas?
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If you're guessing that's the culprit, then try testing with that off and let me know.

    Again, we're not going to investigate until you send us a project that demonstrates the problem. That's our standard bug resolution process now after not being able to reproduce ~70% of bugs that don't include a project.

    Gapless definitely has at least one bug which I will fix soon, but it's different than what you're describing.
     
  17. comixplay

    comixplay

    Joined:
    Sep 27, 2013
    Posts:
    104
    Hi,
    I'm using a playlist for my music - it loops well when it's WAV, but when I convert the same file to MP3, it has a small gap before starting again (I tried the gapless music switching but it didn't help)
    Is it me or something in AudioManager?
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Most likely you didn't use a program that can make gapless mp3's (or whatever they're called). You should ask this question on the Unity audio forum as it's not Master Audio specific. Our plugin just uses a normal looped Audio Source provided by Unity.
     
  19. comixplay

    comixplay

    Joined:
    Sep 27, 2013
    Posts:
    104
    Thanks, I'll check that (btw, they do loop okay in winamp)
     
    jerotas likes this.
  20. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    Just thought I should let everyone know that I solved the music issue I had by simply stopping the playlist on suspend and starting it again when returning from suspend. Works great.
     
    jerotas likes this.
  21. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    The latest version is throwing a few warnings on Unity 5.3.0. I'm guessing you're already on it but thought it would be good to give you a heads up. ;)
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thanks, this will be fixed for the next update.
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio and Core GameKit are now on sale for half off! Pool Boss is also FREE for a few days, so grab it while you can! Links in signature.
     
  24. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Hi Brian,

    I have a bug with repro that I'd love for you to look at. It appears I have a case where MA is unable to get the length of a variation in a sound group that is created via a DynamicSoundGroupCreator.

    Here is a zipped up project. It has everything but MasterAudio in it. If you just drop MasterAudio in, everything should work.

    https://www.dropbox.com/s/zsk3e048r...cSoundGroup-VariationLengthBug-Repro.zip?dl=0

    This is a pure testcase. You just need to open up the only scene in the project and hit play. You'll see that there's a DynamicSoundGroupCreator with a single group and a single variation on that group. The test script just tries to get the length of that single variation. It can't find the variation. There are prints in the console spelling it all out.

    Looking in the debugger, by the time the GetVariationLength is called, the sound group appears to have zero variations.

    If you could look at this I'd really appreciate it!
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I have the fix. If you email me I'll send it to you.
     
  26. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Thanks man! After 5 minutes of looking I'm going to admit I have no idea how to email you! :)
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    For any publisher, go to the plugin page on the Asset Store, then click on the link "publisher: DarkTonic" at the top. The publisher page has support email address and support website (forum) links. :)

    https://www.assetstore.unity3d.com/en/#!/content/5607
     
  28. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    I emailed you. Lemme know if you didn't receive. Thanks again.
     
    jerotas likes this.
  29. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    HI Jerotas, just upgraded a project to 4.7 and MA throws the following error...

    Code (CSharp):
    1. Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/MasterAudioGroup.cs(186,40): error CS0117: `DarkTonic.MasterAudio.AudioResourceOptimizer' does not contain a definition for `RemoveLoadedInternetClip'
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Have you tried deleting the entire plugin (Assets/DarkTonic folder) and re-importing from the Asset Store? The files moved a few versions ago to Plugins/DarkTonic so delete that folder too if it exists.

    If that doesn't work, what platform and Unity version are you using? I compile fine on Unity 5.3, PC/Standalone platform.
     
  31. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Thanks for the prompt reply.

    It's on OSX 4.7.0 Pro, iOS. Project was fine with 4.6.9p4. That error popped up when upgraded to 4.7. I've tired deleting MA and re-importing after that with the same result and also tried reimport all. I think it might be some change in 4.7?
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Oh, I didn't know there was a Unity 4.7. I'll download and fix this for the next ersion.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Email me with your invoice PDF and I'll send you the update.
     
  34. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Ah that was quick :) thank you. I'll email now...
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 3.5.8.8 has been submitted. Changelog:
    • Fixed bug where songs added to a Playlist Controller's queue sometimes would not play when Gapless Song Transitions is turned on.
    • Fixed compile error with optional Playmaker Custom Actions.
    • Added new property OriginalVolume to MasterAudioGroup class.
    • Added new property OriginalVolume to GroupBus class.
    • Fixed Unity 5.3 warnings.
    • Fixed bug with GetVariationLength with Dynamic SGC's
    • Fixed Bug when dragging in special language folder located Audio Cips into Playlists. Should not ignore the special folder name when populating Resource filename.
    • Added "Group by bus" option to Dynamic SGC.
    • Fixed compile errors for Unity 4.7
     
  36. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    HI jerotas,

    I need some help with triggering sound when a player enters a town.
    I am using a sphere with trigger enabled and Event Sound attached to it. For some reason they audio clip is not triggerred which I have added to the Master Audio and playlist.

    Do you have any video which shows how a sound clip is triggered upon player touching a box/or something becoming visible etc (FadeIn) etc?

    Thanks
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This is kind of a general Unity question and not Master Audio if it relates to a trigger not happening. First, I would have you turn on "Log Sounds" in Advanced Settings so you know if the sound is being played or not (might be silent). Also watch the Master Audio mixer and see if that Sound Group LED lights up and voice count indicator changes.

    If not, you may need to add rigidbodies to both parties of the collision, and one of them may need to be "gravity". Also you may have disabled collisions between those 2 layers in the Physics dialog in Unity.

    I'm not sure which video shows the collider setup (I definitely don't add colliders in the video, they are already there), but you can study the example Scenes for "visible" sounds on the asteroids for example.
     
  38. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309

    Thanks , I will try that. Right now i need to recover my project which unity deleted for no reason.
     
    jerotas likes this.
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Just wanted to mention that Master Audio is currently on sale for $30, which is $2.50 less than the 24-hour sale on Audio Toolkit today. There is obviously no comparing the 2 plugins. Ours is much richer in functionality. Audio Toolkit was good at the time it was made but hasn't really evolved much at all. It didn't do enough for our sound guy so we made our own plugin.

    Cheers!
     
  40. chasepettit

    chasepettit

    Joined:
    Oct 23, 2012
    Posts:
    42
    I don't know if anyone has proposed a splitscreen option yet, but I just wanted to say that I've had some initial luck integrating Master Audio with "SSAM - Split Screen Audio Manager" from the asset store. There are likely more stumbling points I'll hit along the way, but here's a general outline of the modifications I needed to make to get them to work together:
    • Replace every AudioSource in Master Audio with STAudioSource. This includes all references in Master Audio's scripts and on its prefabs.
    • Update the STAudioSource script so that when in the editor you set the value of the class's internal serialized field instead of the setting the value on its output AudioSource. Basically just put all of the class's public properties into an #if/else UNITY_EDITOR conditional compilation check, and modify the in-editor version to only set the output AudioSource's value if it isn't null and otherwise set the private variable. You could do this without the conditional compilation and just always check if output is null on all of the getters and setters, but those checks are all going to be unnecessary in the distributable version of your game.
    • Ditch all of your old AudioListeners and add STAudioListener to the objects that you want to behave as an individual player's listener.
     
    Last edited: Feb 1, 2016
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's cool. You might want to post this on the support forum. People are unlikely to find this on page 56 of this thread :)
     
  42. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    92
    I might have just missed this in the documentation but, I noticed that when I add a new sound effect it has a "Silence" variation added to the clip by default. It took me a while to figure out why my button click noises in the UI were only firing 50% of the time, ha. Is there a reason this is added by default? Is there a setting I can change to remove this for all new sounds that are added? Is there an advantage for using this that I'm missing?

    Cheers!
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds like you've selected Group Template "50% chance play", probably without realizing it. That's not the default template (that would be "Default single"). Group templates save you time (when selected intentionally) on creating particular sound effect variations, such as "Pitch falling chromatically", which automatically sets up 7 variations of a single clip you drag in, all with different pitch. Some people actually want Sound Groups that play only 50% of the time, which is why this option is there.

    Anyway, change it back to "default single" here on the Master Audio game object, or turn off "Use Group Templates" entirely with the checkbox:

    upload_2016-2-5_8-26-17.png
     
  44. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    92
    That's exactly what it was, thanks Jerotas!
     
    jerotas likes this.
  45. imaleper

    imaleper

    Joined:
    Nov 14, 2012
    Posts:
    30
    Hey!

    Is it possible to Stop a specific instance of a soundgroup voice?

    As in, I am looping a sound effect, but need a couple of instances of it and wish to stop a specific instance without stopping the others...

    Any help would be greatly appreciated. Thanks
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Normal use is to use MasterAudio.StopAllSoundsOfTransform or MasterAudio.StopSoundOfTransform, assuming it is triggered as "follow caller" or "play at transform". These can be done from EventSounds script without writing code.

    If not, then you'll need to not use "AndForget" methods when playing the sound so you can call Stop method on the PlaySoundResult object that it returns. This would involve writing code.
     
  47. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
    I just noticed this in the profiler, a search showed it's from your app, isn't 27% way too much? I don't even have it
    activated or any sounds in my game
     

    Attached Files:

  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's not Master Audio specifically unless it says so underneath that when you expand it. AudioManager is internal Unity stuff, or overhead. Master Audio stuff will show up with the word MasterAudio / SoundGroupVariation / PlaylistController, etc.
     
  49. netics

    netics

    Joined:
    Aug 23, 2011
    Posts:
    102
    Bug report.

    In MasterAudioInspector.OnEnable(),
    it set the EditorApplication.playmodeStateChanged callback by = operator.
    It should be += operator.
    Because other plugins use the callback, too.
     
  50. netics

    netics

    Joined:
    Aug 23, 2011
    Posts:
    102
    If you worry about callback duplication, you can use -= first, then += again.
     
    Last edited: Feb 17, 2016