Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,572
    You were on the right track. I just did a test and got it working. All you have to do is:

    1) Drag the entire DarkTonic folder into your Packages folder (not just the Master audio folder, but the folder above that).
    2) Open MasterAudio.cs and change line 10 to the following:

    public const string MasterAudioFolderPath = "Assets/Packages/DarkTonic/MasterAudio";

    After that the Master Audio Manager window and everything worked for me. First I had a typo and things didn't work because I misspelled "Packages" in the path variable.

    I've updated the documentation just now to spell that out a little more clear. That should get you working. Let me know if you have any other trouble.
    -Brian
     
    Last edited: Oct 11, 2014
  2. dizzywhip

    dizzywhip

    Joined:
    Mar 17, 2014
    Posts:
    6
    Thanks for the super quick response, I really appreciate it! I think the problem I'm having is that I'd also like to move the Editor Default Resources and Gizmos folders so that everything related to the package is all in one place, like this:

    Assets/
    Packages/
    MasterAudio/
    DarkTonic
    Editor Default Resources
    Gizmos​

    Is something like that possible?
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I don't believe you can move the Gizmos or EditorDefaultResources folders, or they won't work - those are Unity specific folders that are supposed to live in the root of Assets.

    What's alarming is that most plugins don't use EditorDefaultResources and so take up room in your build with graphics used for the Inspectors. We made sure that is not the case with ours.
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
  5. dizzywhip

    dizzywhip

    Joined:
    Mar 17, 2014
    Posts:
    6
    Ahh that's too bad, I understand it's out of your control though. Thanks again for the quick responses! I'll be sure to leave a positive rating after using the package for a little while.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem. Let us know if you think of anything that can be improved after you use it for a bit.
     
  7. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Cheers :) ...Tested Synkro loops of my first music pack, sounds good. Will submit to Asset Store next week. Once approved, will provide some sample clips of my music for your consideration to include in MasterAudio.
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Excellent srmojuze!
     
  9. Andreas Busk

    Andreas Busk

    Joined:
    Mar 21, 2014
    Posts:
    25
    How do I attach a sound to an animation as this opening door.....?

    Skærmbillede 2014-10-11 kl. 21.25.07.png
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I can't tell if that uses Mechanim or legacy animation? You should probably just play a sound with code inside your script like:

    MasterAudio.PlaySoundAtTransform("DoorOpenSound", this.transform);
     
  11. Andreas Busk

    Andreas Busk

    Joined:
    Mar 21, 2014
    Posts:
    25
    Thanks for the swift answer!
    Sorry, I'm new to Unity and the above shown script isn't written by me. I'm afraid I don't know the difference between Mechanim and legacy. I was hoping to avoid using any code by using master audio.
    I've now added a Event Sounds component in the inspector as shown here: Skærmbillede 2014-10-11 kl. 21.57.02.png My sound 'squeak-two' plays at the right moment but since the door animation plays only once, it is a problem that walking through the same area again gives me more sound without any animation.
    Can I tell master audio to only play the sound once?
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not without code. You could for instance write code to mute that Group after it plays once.
    You could set the retrigger limit to 10 seconds, but that will only decrease your problem, not eliminate it.

    If it's Mechanim, there's a Mechanim State Entered event you can use in that Event To Activate dropdown on Event Sounds instead of using Trigger Enter. Then you just pick the state of the door opening and it do what you want.

    If it's legacy animation (I hope not as that is SUPER old), there's not really anything we can hook onto and you'll need to put in that one line of code (which I gave you above) right next to the code that triggers the animation.

    Hopefully you're using Mechanim, then you won't have to open the code editor.

    -Brian
     
  13. Andreas Busk

    Andreas Busk

    Joined:
    Mar 21, 2014
    Posts:
    25
    I must seem like a fool asking this but how do I 'pick the state of the door opening'? It refers to what I'll write in 'State name' in Mechanim State, right?
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes, copy from Mechanim into the State Name field in Event Sounds. You're not a fool, you're just very new :)
     
  15. Andreas Busk

    Andreas Busk

    Joined:
    Mar 21, 2014
    Posts:
    25
    yes, very new, indeed. I can't seem to reveal if my animation is a Mechanim or not.......
    Here's is the code of the open door javascript, maybe you can tell me?

    #pragmastrict
    vardoorObject:GameObject;
    varopenedDoor:boolean;
    functionStart () {
    openedDoor=true;
    }

    functionUpdate () {

    }

    functionOnTriggerEnter(other:Collider){
    if (openedDoor){
    doorObject.animation.Play();
    openedDoor=false;
    Debug.Log("open");
    }
    }
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Looks like not Mechanim to me. Not positive. Go to the game object where your animation clip is stored and open Window -> Animator. If there's nothing there then it's not Mechanim.
     
  17. Andreas Busk

    Andreas Busk

    Joined:
    Mar 21, 2014
    Posts:
    25
    nothing there, is it because my scene is ancient? https://www.assetstore.unity3d.com/en/#!/content/16674
    - I guess it's your coding thing then....
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It's because it's at least 2 years old then. You can always switch it over to Mechanim, but that would require learning Mechanim. And usually you have to write a little code to use Mechanim, for variables and such.
     
  19. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Can you help me with this? At title screen in my game I want to play 1st song from my "title" group and after it's finished playing want to play 2nd song from my title group.

    I attached the Event Sound Component and added "Start" event and created 2 actions, 1st action to play the 1st song and 2nd action to play the 2nd song. but they both play at the same time when I run the game. How can you delay the 2nd song?
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Actions in EventSounds don't (and can't) wait for the previous action to finish playing. They just fire them off in order after *starting* the action. So what you are seeing is expected.

    Why haven't you put your songs into a Playlist? Then you could just start the Playlist and let auto-advance go to the second song by itself.
     
    noanoa likes this.
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 3.5.5.9 will be live in 20 minutes! Some very important items finally got done! Gapless transitions!!! Changelog:

    • Added gapless song transitions for Unity 4+ users. You enable it from the Advanced Settings of the MA prefab. It is off by default because it generally will not be needed for users who use crossfading. If you turn it on, with Resource files, audio memory usage will be more as most amount of the time there will be 2 Resource files in memory simultaneously. Known issue: If you change (jump via code) the position of the current song into the cross-fading portion at the end, the next song will arrive after the cross fade is complete. This should be ok since usually you will not use crossfading and gapless at the same time.
    • Added Random Start Position (min/max) option & controls to each Variation. This lets you randomly start playing the audio clip at a random position at X% of its length if enabled.
    • Added MasterAudioSoundUpgrader, a window that helps you prepare a project that has existing audio for switching over to Master Audio. It has buttons to find all existing Audio Sources in a Scene and then delete them so there won't be any audio not controller by Master Audio. It should be used in each Scene. You can also use it even after configuring Master Audio in your Scene, to find any forgotten Audio Sources not controlled by Master Audio. It will safely ignore the ones that are controlled by Master Audio.
    • Added a Hierarchy icon for Playlist Controllers. It's 2 blue eighth notes.
    • Added Group Templates feature. We have started with 18 in the MasterAudio/Sources/Prefabs/GroupTemplates folder. You can create more of your own (please send them to me for consideration if so). Bulk Creation Mode is disabled when using Group Templates because Group Templates take a single audio file and create 1 or more Variations of it based on the template). Some of the Group Template are: Random Volume Extreme, Single Variation 5 Voices, Pitch Rising Chromatic, Dialog With 1 Second Fade, 25 Percent Chance Play, etc. Be extra careful that you don't put any Audio Clips or filter FX into the templates themselves as they will take up audio memory even if you haven't created any Groups with the templates! We check that both of those aren't in the template up front, but if you add them to the template prefab later, we cannot catch that.
    • Playing a Variation with no audio assigned now doesn't take any voices up. This is good to use for a type of "% chance to play" on a Dialog Sound Group, so a silent clip won't shut off the currently playing non-silent one.
    • Fixed bogus Jukebox warning when starting the same Playlist again with the Play button.
    • Fixed Inspector bug for Dynamic SGC where after the 1st Variation in a Group, the rest were greyed out and disabled.
    • Fixed bug: Variation's priority (AudioSource component) wouldn't be reset back to normal on each play.
    • Fixed bug: Null reference error when you only have a single Looped Chain Sound Group and press play.
    • Fixed bug: First Sound Group shows on LED meter on mixer after 1 second sometimes.
    • Fixed bug: Dialog and Chained Loop groups didn't show on LED meter on mixer.
    • Fixed bug: The sound played silently during warming (silent) should not log anything to Console regardless of MA logging settings selected.
    • Fixed bug: The variation played for warming (silent) shouldn't be removed from the randomizer so you can play it for real before waiting for the randomizer to refill.
    • Fixed bug: The variation played for warmup (silent) should not trigger any linked Groups.
    • Fixed bug: Retrigger Limit Mode on Event Sounds was shown for each action when it is not a per-action setting. It's per event (group of actions).
     
  22. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    You say 'Unity 5 ready'. That mean 'works on Unity 5' or use Unity 5 NEW audio functionality? ;)
    BTW, customer here. :p
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Both. It does "work on Unity 5", but you can also use any of the new stuff like the Unity mixer, ducking, bus FX and all that. It's not integrated into our plugin at all (no zero-code actions yet), but Master Audio and Unity 5 stuff do not get in each other's way at all. They can be used in conjunction. That means you can go in and set both Audio Sources of a Playlist Controller to a Unity mixer channel so you can add FX to it, and other things like that.

    After Unity 5 is released, we'll add more integration to make things easier, but it's already usable.
     
    Last edited: Oct 15, 2014
  24. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks for the reply.
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem!
     
  26. citizen_12

    citizen_12

    Joined:
    Jun 21, 2013
    Posts:
    33
    Evaluating audio manager options here. Can you tell me-- does Master Audio support intro/loop/outro style sound cues? Specifically, I'm looking to support sounds like automatic machine gun fire. Also, I'm looking to set limits on the number of simultaneous instances of a sound. There are only so many machine guns you want to play before it becomes a muddled mess.

    Thanks.
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can definitely set limits on the number of each sound. How exactly does a intro/loop/outro sound work? It doesn't sound like that would happen out of the box currently, but I'm not sure. There might be an easy way to script that.

    What other options are you looking at? It's good to know our competition.
     
  28. citizen_12

    citizen_12

    Joined:
    Jun 21, 2013
    Posts:
    33
    It's a feature in Audio Toolkit. The basic idea is a looping sound cue that starts up, loops until stopped, and ends cleanly. Imagine a scenario like a chain gun or gun turret where there is a spinup sound, followed by a looped "bang bang bang" sound of firing (or possibly a set of slightly variant "bang" sounds that are randomized or played in sequence), followed by a spindown sound when firing ends.

    Yes, one could do it on one's own, but if I can get it from my middleware package it saves me some time.
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes Master Audio lets you do that, but not without some code. Here's some code that would do that assuming the 2nd sound loops (if it doesn't, it will just play all 3 in a row). Actually though, you could have as many sounds as you like in that chain - i.e. more than 3 if that would has any uses for you.

    Code (csharp):
    1.  
    2. var result = MasterAudio.PlaySound("Arrow");
    3. if (result.ActingVariation != null) {
    4.    result.ActingVariation.SoundFinished += delegate() {
    5.    var r2 = MasterAudio.PlaySound("Scream");
    6.    if (r2.ActingVariation != null) {
    7.       r2.ActingVariation.SoundFinished += delegate() {
    8.       MasterAudio.PlaySound("Blast");
    9.    };
    10. }
    11.  
    Audio Toolkit is missing tons of features that we have as well. But there may well be zero that Audio Toolkit has and we don't. I don't know that product as well as Sound Manager Pro unfortunately so I can't give you a definitive list. But we're definitely the most full featured audio plugin on the Asset Store by no small margin. If you go outside the Asset Store you can get more expensive powerful products like FMod and Fabric (for projects under $100k) for free, which are "no support" versions with no source code. However, we also have the best support - bar none, even over the expensive options - no doubt about that.

    Let me know if you have any other questions.
    -Brian
     
    Last edited: Oct 17, 2014
    I am da bawss likes this.
  30. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Hey Brian - I'm on v3.5 and see a bug that maybe you could look at at some point.

    I'm using a single group for my VO and I have a method that plays particular variations by name. Each variation has a few different effects on it - reverb, distortion, highpass. When I go to make a new variation, it is way too much work to go through the MA UI and reassign the effects, so I just clone the variation in the inspector. This should work, and it seems that sometimes it does. However I am getting nullrefs especially when it tries to query the variations list - like when getting the variation length. I will dig up the error when I get it to happen again.

    I am able to work around the problems by adding a new variation through the MA UI, applying the prefab (my whole MA is a prefab), then deleting the variation, then applying the prefab again. My guess is that this is going over all the variations and setting up the data properly.

    Anyway, could you handle manual cloning of variations better? If you need a repro let me know and I'll put one together.

    Thanks!
     
    I am da bawss likes this.
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hmmm, I haven't seen any problem with cloning at all. Let me know if you figure out how to reproduce that bug. Good that your whole MA game object is a prefab - that's what we do too.
     
  32. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Hello Brian,

    I am stuck with the dynamic localisation. What is the proper way to switch the language at run time?

    Stephane
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    There's a line of code in the readme that you'll need to use:

    Code (csharp):
    1.  
    2. MasterAudio.DynamicLanguage = SystemLanguage.German; // replace German with the language you want.
    3.  
    Also, the map of localized Resource files happens when the MA prefab runs the Awake event. So you will have to switch Scenes (actually you just need to load a new Master Audio prefab, but that only happens at Scene change with a non-persistent MA prefab) before that language switch will happen. This is ok because normally language is changed at the Main menu scene, then you load the game scene.
     
  34. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Hey Brian - have you gotten any complaints about MA affecting Undo? I have found that when it's in my projects I'll end up not being able to undo things - even non MA related actions like transforming a gameobject. Just now it happened with a new project and I deleted all the MA related stuff and Undo works fine again. I see there's an UndoHelper script in your stuff. Anyone else have problems with this? Thanks.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No we haven't, and that would make absolutely no sense. It must be a weird coincidence. UndoHelper is only used by Master Audio's Inspector scripts and it wouldn't affect non-MA undo things at all because that's not how the Unity Undo API works - we give Unity's Undo a list of MA things to be able to undo, right before they happen. Everything non-MA thing is handled either by Unity native code or if it's a plugin, then it's handled by something similar to UndoHelper that the other plugin author wrote. Regardless, I don't believe there is a way to affect Undo functionality external to our plugin via code anyway.
     
    Last edited: Oct 20, 2014
  36. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Thanks you. Actually, is it possible to extract the init code from the Awake() method after the GameObject.FindObjectsOfType... and put is into a public Initialize method? This way I would not have to deal with this.
    I can certainly try this myself but do you see a reason why it would not work? The thing is that my main menu has sounds as well...
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Of course your main menu has sounds as well. Are you saying it's a problem because you want to localize sounds on the main menu? I would advise against that. It's not easy to move out the initialization into something you could call, and it's also problematic if you called it because there could be existing localized sounds already playing when you do the switch. If so, we couldn't replace the resource file map then without losing track of those sounds and that means the memory wouldn't be released for those.

    So to answer your question: probably not, unfortunately. We won't ever intentionally put code into our product that could cause a memory leak in any circumstance.
     
    Last edited: Oct 21, 2014
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hotfix time! Master Audio V 3.5.6 will be live in 20 minutes. Changelog:

    • Fixed bug where after adjusting a bus volume, AdjustVolume (on the Variation) would pretend bus volume was at full.
    • Fixed bug where Master Audio Inspector would break on newest Unity - BIGGIE.
    • Fixed some things in UI to make it less confusing. Since "Loop Clip" in each Variation isn't used (loop not allowed) for Chained Loop Groups, there's no checkbox there, but a message instead explaining why it isn't.
    • With Synchronized Playlists, the Loop Clip setting is also not shown because every song must loop. A message explaining is there instead.
     
  39. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Ok, I was trying to create an account in the darktonic forums but it always stops at the "I agree to the terms..." I click continue and nothing happens.

    @jerotas: I saw this post you made: http://darktonic.freeforums.net/post/399

    I have the same situation. My game has several levels. I'd like the ability to just jump to any level immediately to test/tweak it, rather than opening the main menu scene first, selecting the level, wait for the loading screen to finish, etc.

    So I prefer that MasterAudio can initialize itself on any scene I opened in the Unity Editor. But of course I don't want any duplicate of the MasterAudio prefabs, so simply putting the prefab on every scene won't work. I tried making my own script that will check first if MasterAudio exists in the scene already, and if not, will Instantiate the prefab (plus the PlaylistController I made), but it seems that caused MasterAudio to not initialize properly. Any ideas how to do this properly?

    EDIT: btw, apologies if this has already been asked, with 37 pages in this thread, I wish there was a way to search within a thread only
     
    Last edited: Oct 21, 2014
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I can try making an account tonight as a test on the support site, not sure what's going on. You might want to try in a different browser?

    The only way is to make clones of the main MA prefab and PC prefab in each Scene. I'm saying to make a prefab out of the one in your main scene, then use that prefab everywhere else. Since they are prefabs you can apply changes when you change something and it will affect all scenes so it's not any hassle. You shouldn't be Instantiating them because the PC and the MA prefab interact with eachother when they startup, and if they aren't there at the exact same time it will fail sometimes.

    When you're ready to release, you can delete the MA & PC prefabs from all Scenes except the Bootstrapper.
     
    Last edited: Oct 22, 2014
  41. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    hey Everyone! Master Audio is pretty awesome:) I just upgraded to 3.5.6 I believe.

    Since my upgrade I'm getting this error when my machine gun fires. My sound group's instance weight is set to 4. the errors pops up when it seems like the number of calls I'm making exceeds 4...but that should work right?..this worked without problems in my previous 3.xx version (I forget the exact version #)

    ArgumentException: An element with the same key already exists in the dictionary.
    System.Collections.Generic.Dictionary`2[System.String,UnityEngine.AudioClip].Add (System.String key, UnityEngine.AudioClip value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
    AudioResourceOptimizer+<PopulateSourcesWithResourceClipAsync>c__Iterator1A.MoveNext () (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/AudioResourceOptimizer.cs:168)
     
  42. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Understood. The workaround is less than ideal. If I want to test it starting from the main menu, I'll get duplicates of the MA prefab. Would it be safe if I make it that an MA prefab will delete itself if it finds one existing already?

    Additionally I'll just make it that upon building, the MA prefabs on other scenes are removed, then re-added after building... or something like that.
     
  43. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    The way to solve this issue is to make sure your levels each have a required component, which they probably already do, with a low script execution order so that it runs first. Then check to see if it was run directly (without going through the main menu, e.g. checking if some bootstrapping code was run yet), and then have it redirect itself back to the bootstrapping code (or main menu) with a special cased "pass through" - i.e. it tells the main menu, just load the level I am on automatically.

    This way you can start any level you want, and it runs the bootstrapping code (which you probably want anyway), and it will automatically reload the level you are on. The downside is that it has to unload the level you are on, and then load the boot strapper and then the level you are on again. In practice with fairly complex levels this has not been an issue for me as it is still pretty fast.

    This is not an issue with Master Audio and frankly, Master Audio should not be in the business of solving it.
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'll try and reproduce this error tonight and report back. That's a resource file, right?
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, you won't get duplicates. If you have a persistent MA prefab, each time the Scene changes, if there's a "new" MA prefab in the new Scene, it will be automatically destroyed so the persistent one will continue to be used. MA has this logic built in. I believe the manual states this. That code was added specifically to allow testing from non-bootstrapper Scenes (so you can add the same MA prefab in each Scene).
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, that's one way to do it. A little weird but it would work. This is a Unity problem with the way Scenes and prefabs are built, not a MA problem. There isn't an "ideal" way to fix it, only workarounds. I believe my workaround is the best, although admittedly it doesn't handle non-MA prefabs in your bootstrapper. DirtyHippy's does :)
     
  47. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Strange, I had duplicates one time, it must have changed with a new version. I'll look into it again. Thanks.
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not recently. This was done ~6 months ago. If you can find a case where you get duplicates, let me know how.

    If you are loading a Scene "async" that may lead to this, but I don't think there's a way to solve that one.
     
  49. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    yup! resource files!
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, I reproduced the error by playing the sound 5 times in the same frame. Here's a fix. Open AudioResourceOptimizer.cs and change the very end of the PopulateSourcesWithResourceClipAsync method to this:

    Basically, you're just putting the if statement around that Add statement. That should fix it. This will be in the next release.

    Code (csharp):
    1.  
    2. if (!audioClipsByName.ContainsKey(clipName)) {
    3.      audioClipsByName.Add(clipName, resAudioClip);
    4. }
    5.   if (successAction != null) {
    6.       successAction();
    7.   }
    8.