Search Unity

[RELEASED] SoundManagerPro: Easy Game Music Plugin

Discussion in 'Assets and Asset Store' started by AntiLunchBox, Jun 12, 2013.

  1. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    I'll add this to the list of functionality to add, great idea!
     
  2. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey eri,

    Sorry for the delay, this kind of thing is really easy to do with the new feature SoundPockets. You basically just load it whichever appropriate SoundPocket into the scene (it looks exactly like the SFX section on the SoundManager) and applies those settings.

    If you want to do this through code, you CAN use SoundManager.ApplySFXAttributes function. It'll give you the option to add, prepoolamounts, basevolume, volume variation, and pitch variation. They are optional overloads so you can just use the prepool amount if you want.

    ALB
     
  3. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @AntiLunchBox could you explain what SoundPockets are? There is no documentation on them as far as I can see...
     
  4. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey DJ,

    First off, you'd want to check: if(SoundManager.MuteMusic == false) because your version is using an assignment operator. Secondly, you it's much easier to just use SoundManager.IsMusicMuted == false

    ALB
     
  5. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Sure, I'm finishing up the documentation today. There are tooltips on the component in the editor that explains it, so just drag your mouse over any label and it'll say what it does.

    Basically, it's a component that you can add to any gameobject that modifies your SoundManager's SFX. It actually looks exactly like the SFX section on the SoundManager. So you can either additively add new clips, or replace all the clips on the soundmanager with those on the soundpocket. Soundpockets share all the same setting options like prepool amount, base volume, volume variation, and pitch variation.

    So for example, this could be useful for:
    - Only loading certain SFX on certain levels for performance
    - Only loading certain SFX if a player chooses certain settings
    - Loading different SFX files that have the same name but sound different (so you don't have to change your code, if referencing clips by string name). So lets say you want an explosion inside to sound different from an explosion outside, you can have two explosion clips of the same name, but just load the "inside sounds" sound pocket when inside, etc.

    ALB
     
  6. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Peter,

    Yes, just make sure the audioimporter settings on your audioclip have 3D sound enabled. By default audioclips are played at 0,0,0 but you can specify the location in the overload. Or you can just use the overload that takes in a gameobject or audiosource, and it'll play it from that game object.

    ALB
     
    PeterHann likes this.
  7. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Gavia,

    I believe we're chatting through email so we'll just continue the conversation there
     
  8. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks for the help. Its cleared things up a little now! Be good to see the new documentation :)
     
  9. Earthyn

    Earthyn

    Joined:
    Jun 29, 2014
    Posts:
    16
    Hey Im having an issue with this asset!

    So I have my scene setup and I'm using the SoundManager.StopMusicImmediately(); but when the player walks into the trigger it says 'NullReferenceException: Object reference not set to an instance of an object SoundManager+<CrossoutAll>c_Iterator4.MoveNext () (at Assets/SoundManagerPro/Scripts/Managers/SoundManager_interal.CS:751

    thanks
     
  10. Eneco

    Eneco

    Joined:
    May 28, 2013
    Posts:
    16
    Hey there, I'm relativly new to SoundManager Pro.

    Actually I'm writing an app for Android. The first part I developed on Platform set to PC and it was working flawlessly.
    Now I switched platform to Android, and even in the unity-editor (on the same pc, just platform switched) the SFX (and musik I quess) is delayed between 200ms and 500ms (just a quess), I tried changing the execution order but this is just breaking it completely.

    Is this a known "Problem" ? How can I solve that issue? - using latest SoundmanagerPro 3.6.2

    Thanks and Regards
     
  11. mujee

    mujee

    Joined:
    Mar 9, 2012
    Posts:
    54
    HI
    I want to Play two music
    1.start Music
    2. gameMusic
    when first music Complete than I call an Event to play Another one.
    I want play first music Only Once in gameplay.

    the problem is that when a its call an event its not play a second music
    tanx
    here is code
    Code (CSharp):
    1. public AudioClip startMusic, gameMusic;
    2.  
    3. void PlayMusic ()
    4.         {
    5.         SoundManager.PlayImmediately (startMusic, false,GameMusic);
    6.         }
    7.  
    8.         void GameMusic ()
    9.         {
    10.         SoundManager.PlayImmediately (gameMusic, true);
    11.         }
     
  12. mujee

    mujee

    Joined:
    Mar 9, 2012
    Posts:
    54
    soundmanger.stop();
    and
    soundmanger.stopimmediately();
    both are not working well
    when I use this
    it stop music after 3 or 4 secs
     
  13. Jojo-Batista

    Jojo-Batista

    Joined:
    Dec 5, 2012
    Posts:
    32
    Hello! First of all, I bought your plugin a few months ago, and since then it's been awesome to use it, super simple, yet complex enough to do what I wanted to do.

    But this time I want to do something really specific and I need your help.

    I have a track divided in 3 parts, they are interchangeable and I want them to play them without any delay between them. How can I do this?

    I tried to do it this way: I added all the song parts as a sound connection, and then I start the Flow Coroutine:

    Code (CSharp):
    1.     IEnumerator Flow() {
    2.         SoundManager.SetCrossDuration (0);
    3.         gameGrid = LevelController.Instance.gameGrid;
    4.         next = introduction;
    5.         SoundManager.Play(next, false, OnMusicPartEnded);
    6.         yield return new WaitForEndOfFrame();
    7.     }
    8.  
    9.     private void OnMusicPartEnded()
    10.     {
    11.         float percentage = gameGrid.GetPercentage();
    12.         for (int i =0; i < stages.Length; i++){
    13.             if (percentage < stages[i].percentageOfGrid) {
    14.                 next = stages[i].sound;
    15.                 break;
    16.             }
    17.         }
    18.         SoundManager.Play(next, false, OnMusicPartEnded);
    19.     }    
    However, this only works once , and then the callback is never called again. I then tried to hack it a little bit:
    Code (CSharp):
    1. IEnumerator Flow() {
    2.         SoundManager.SetCrossDuration (0);
    3.         gameGrid = LevelController.Instance.gameGrid;
    4.         next = introduction;
    5.         SoundManager.Play(next, false, OnMusicPartEnded);
    6.         while(true)
    7.         {
    8.             if(_shouldPlayNextSongPart)
    9.             {
    10.                 _shouldPlayNextSongPart = false;
    11.                 float percentage = gameGrid.GetPercentage();
    12.                 for (int i =0; i < stages.Length; i++){
    13.                     if (percentage < stages[i].percentageOfGrid) {
    14.                         next = stages[i].sound;
    15.                         break;
    16.                     }
    17.                 }
    18.                 SoundManager.PlayImmediately(next, false, OnMusicPartEnded);
    19.             }
    20.             yield return new WaitForEndOfFrame();
    21.         }
    22.         yield return new WaitForEndOfFrame();
    23.     }
    24.  
    25.     private void OnMusicPartEnded()
    26.     {
    27.         _shouldPlayNextSongPart = true;
    28.     }    
    This worked, but it added a delay in between the two song parts.. so my question is, how can I achieve this kind of shuffle effect, but choosing the songs manually ?
    Thanks! and great plugin :)

    EDIT: I just tried out the shuffle and the continous playthrough and both have delays as well, is there a way to have absolutely zero delay between songs?
     
    Last edited: Aug 4, 2014
  14. Seto

    Seto

    Joined:
    Oct 10, 2010
    Posts:
    243
    Hi. I bought your plugin. And it seems come with infinite loop problem. Here's some log for the infinite loop. I'm using the 3.6.2 version.
    Code (csharp):
    1.  
    2. Playing:
    3. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    4. UnityEngine.Debug:Log(Object)
    5. SoundManager:PlayClip(AudioClip, Single)
    6. <PlaySoundConnection>c__IteratorDB:MoveNext()
    7.  
    8. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    9.  
    10. Already playing BGM, check if crossing out(True) or in(True).
    11. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    12. UnityEngine.Debug:Log(Object)
    13. SoundManager:PlayClip(AudioClip, Single)
    14. <PlaySoundConnection>c__IteratorDB:MoveNext()
    15.  
    16. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    17.  
    18. In the process of crossing out, so that is being changed to cross in now.
    19. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    20. UnityEngine.Debug:Log(Object)
    21. SoundManager:PlayClip(AudioClip, Single)
    22. <PlaySoundConnection>c__IteratorDB:MoveNext()
    23.  
    24. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    25.  
    26. Playing:
    27. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    28. UnityEngine.Debug:Log(Object)
    29. SoundManager:PlayClip(AudioClip, Single)
    30. <PlaySoundConnection>c__IteratorDB:MoveNext()
    31.  
    32. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    33.  
    34. Already playing BGM, check if crossing out(True) or in(True).
    35. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    36. UnityEngine.Debug:Log(Object)
    37. SoundManager:PlayClip(AudioClip, Single)
    38. <PlaySoundConnection>c__IteratorDB:MoveNext()
    39.  
    40. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    41.  
    42. In the process of crossing out, so that is being changed to cross in now.
    43. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    44. UnityEngine.Debug:Log(Object)
    45. SoundManager:PlayClip(AudioClip, Single)
    46. <PlaySoundConnection>c__IteratorDB:MoveNext()
    47.  
    48. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    49.  
    50. Playing:
    51. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    52. UnityEngine.Debug:Log(Object)
    53. SoundManager:PlayClip(AudioClip, Single)
    54. <PlaySoundConnection>c__IteratorDB:MoveNext()
    55.  
    56. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    57.  
    58. Already playing BGM, check if crossing out(True) or in(True).
    59. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    60. UnityEngine.Debug:Log(Object)
    61. SoundManager:PlayClip(AudioClip, Single)
    62. <PlaySoundConnection>c__IteratorDB:MoveNext()
    63.  
    64. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    65.  
    66. In the process of crossing out, so that is being changed to cross in now.
    67. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    68. UnityEngine.Debug:Log(Object)
    69. SoundManager:PlayClip(AudioClip, Single)
    70. <PlaySoundConnection>c__IteratorDB:MoveNext()
    71.  
    72. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    73.  
    74. Playing:
    75. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    76. UnityEngine.Debug:Log(Object)
    77. SoundManager:PlayClip(AudioClip, Single)
    78. <PlaySoundConnection>c__IteratorDB:MoveNext()
    79.  
    80. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    81.  
    82. Already playing BGM, check if crossing out(True) or in(True).
    83. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    84. UnityEngine.Debug:Log(Object)
    85. SoundManager:PlayClip(AudioClip, Single)
    86. <PlaySoundConnection>c__IteratorDB:MoveNext()
    87.  
    88. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    89.  
    90. In the process of crossing out, so that is being changed to cross in now.
    91. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    92. UnityEngine.Debug:Log(Object)
    93. SoundManager:PlayClip(AudioClip, Single)
    94. <PlaySoundConnection>c__IteratorDB:MoveNext()
    95.  
    96. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    97.  
    98. Playing:
    99. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    100. UnityEngine.Debug:Log(Object)
    101. SoundManager:PlayClip(AudioClip, Single)
    102. <PlaySoundConnection>c__IteratorDB:MoveNext()
    103.  
    104. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    105.  
    106. Already playing BGM, check if crossing out(True) or in(True).
    107. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    108. UnityEngine.Debug:Log(Object)
    109. SoundManager:PlayClip(AudioClip, Single)
    110. <PlaySoundConnection>c__IteratorDB:MoveNext()
    111.  
    112. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    113.  
    114. In the process of crossing out, so that is being changed to cross in now.
    115. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    116. UnityEngine.Debug:Log(Object)
    117. SoundManager:PlayClip(AudioClip, Single)
    118. <PlaySoundConnection>c__IteratorDB:MoveNext()
    119.  
    120. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    121.  
    122. Playing:
    123. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    124. UnityEngine.Debug:Log(Object)
    125. SoundManager:PlayClip(AudioClip, Single)
    126. <PlaySoundConnection>c__IteratorDB:MoveNext()
    127.  
    128. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    129.  
    130. Already playing BGM, check if crossing out(True) or in(True).
    131. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    132. UnityEngine.Debug:Log(Object)
    133. SoundManager:PlayClip(AudioClip, Single)
    134. <PlaySoundConnection>c__IteratorDB:MoveNext()
    135.  
    136. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    137.  
    138. In the process of crossing out, so that is being changed to cross in now.
    139. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    140. UnityEngine.Debug:Log(Object)
    141. SoundManager:PlayClip(AudioClip, Single)
    142. <PlaySoundConnection>c__IteratorDB:MoveNext()
    143.  
    144. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    145.  
    146. Playing:
    147. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    148. UnityEngine.Debug:Log(Object)
    149. SoundManager:PlayClip(AudioClip, Single)
    150. <PlaySoundConnection>c__IteratorDB:MoveNext()
    151.  
    152. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    153.  
    154. Already playing BGM, check if crossing out(True) or in(True).
    155. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    156. UnityEngine.Debug:Log(Object)
    157. SoundManager:PlayClip(AudioClip, Single)
    158. <PlaySoundConnection>c__IteratorDB:MoveNext()
    159.  
    160. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    161.  
    162. In the process of crossing out, so that is being changed to cross in now.
    163. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    164. UnityEngine.Debug:Log(Object)
    165. SoundManager:PlayClip(AudioClip, Single)
    166. <PlaySoundConnection>c__IteratorDB:MoveNext()
    167.  
    168. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    169.  
    170. Playing:
    171. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    172. UnityEngine.Debug:Log(Object)
    173. SoundManager:PlayClip(AudioClip, Single)
    174. <PlaySoundConnection>c__IteratorDB:MoveNext()
    175.  
    176. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    177.  
    178. Already playing BGM, check if crossing out(True) or in(True).
    179. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    180. UnityEngine.Debug:Log(Object)
    181. SoundManager:PlayClip(AudioClip, Single)
    182. <PlaySoundConnection>c__IteratorDB:MoveNext()
    183.  
    184. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    185.  
    186. In the process of crossing out, so that is being changed to cross in now.
    187. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    188. UnityEngine.Debug:Log(Object)
    189. SoundManager:PlayClip(AudioClip, Single)
    190. <PlaySoundConnection>c__IteratorDB:MoveNext()
    191.  
    192. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    193.  
    194. Playing:
    195. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    196. UnityEngine.Debug:Log(Object)
    197. SoundManager:PlayClip(AudioClip, Single)
    198. <PlaySoundConnection>c__IteratorDB:MoveNext()
    199.  
    200. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    201.  
    202. Already playing BGM, check if crossing out(True) or in(True).
    203. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    204. UnityEngine.Debug:Log(Object)
    205. SoundManager:PlayClip(AudioClip, Single)
    206. <PlaySoundConnection>c__IteratorDB:MoveNext()
    207.  
    208. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WebPlayerGenerated/UnityEngineDebug.cpp Line: 53)
    209.  
    210. In the process of crossing out, so that is being changed to cross in now.
    211. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    212. UnityEngine.Debug:Log(Object)
    213. SoundManager:PlayClip(AudioClip, Single)
    214. <PlaySoundConnection>c__IteratorDB:MoveNext()
    215.  
    My audioclip is loaded with WWW.audio. And I PlayConnection while it's loaded. But from the log I can see my code doesn't play another connection.
    Code (csharp):
    1.  
    2. SoundConnection sc = SoundManager.CreateSoundConnection("SC", SoundManager.PlayMethod.ShufflePlayThrough, audioClips.ToArray());
    3.         SoundManager.PlayConnection(sc);
    4.  
    The audioClips is only with one track in this situation.
    And I debug output the outCrossing. The outCrossing is always false, true. And then the PlayClip function will think it's crossingOut, but the currentPlaying variable in PlayClip is 0. Then it will only set outCrossing[0] to false. And the outCrossing[1] will be always true. And it will become an infinite loop.
     
    Last edited: Aug 6, 2014
  15. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Earthyn,

    Just ran into this problem. Seems to be related to another issue I'm trying to fix. Would you by any chance have a setup with 1 song SoundConnections? And some of those 1 sound SoundConnections have the same sound? Would really help me lock down this use case.

    ALB
     
  16. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Eneco, I believe I answered you in email. Let me know if it's not the same person!

    ALB
     
  17. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Yes seems to be a newly introduced bug I'm fixing. I'll have a fix soon.
     
  18. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Seto,

    Unfortunately, clips loaded with WWW won't work with SoundConnections. When loaded through WWW, information on clip length and samples (and other info required for SoundConnnections) don't come with it (it has to be bundled with the project). You can only play the files--it's just a Unity limitation.

    A super slow solution is to decode mp3 to wav, then convert the wav to floats, then load the samples into an empty AudioClip. This can be done in blocks too, and the AudioClip can be quite small and act as a ring buffer.

    Or you can try playing them as SFX.

    ALB
     
  19. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    this is now fixed
     
  20. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    This has been fixed
     
  21. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey mujee, this has been fixed.
     
  22. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey jojo,

    Looks like there was a bug (an accidental deletion actually) that broke the runonend functions. It should work now, the fix is posted. Let me know if you're still running into issues.

    ALB
     
  23. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Hi AntiLunchBox,

    Thanks for such great sound plugin!

    We are making a music game which needs to play lots of different short sound notes concurrently and even same note sound frequently, say might be every few ms (for instance, canon song).

    Just wondering does it support sound pooling and playing same sounds frequently? Just like SoundPool API in android?
    And also will this plugin deal with unity3d's delay playing of the sounds on android and ios platform?

    Thanks in advance.

    Michael
     
  24. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hi michael,

    Yes the SFX functions support sound pooling and playing the same sounds frequently. You can also prepool sounds, and set a maximum cap for each sound.

    There is a parameter to set delay on every sfx function as well.

    ALB
     
  25. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey all,

    antilunchbox.com is going through a redesign and is temporarily down. Updates will include:
    • New documentation for SMP! Currently available at the same url: http://antilunchbox.com/htmldocs/smp/index.html
    • New dedicated forums, say goodbye to this thread soon!
    • New updates on the Ambrosia game soon!
    • Improved in-monodevelop documentation as a result.
    Hoping you guys like the new site when it's released!
    ALB
     
  26. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Hi AntiLunchBox,

    Thanks for the answer! I have just bought your plugin. Hope it will work as expected :)

    Michael
     
  27. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Just wondering is it possible for us to call the code in C# directly rather than using the editor to cope with the sounds. Since our sounds will be dynamically generated at the server side. Thanks!
     
  28. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
  29. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Thanks ALB
     
  30. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Is there an option to enable/disable if a short clip will play only once or play in a continuous loop? I know it can be done with a command but I want this option in the inspector.
     
  31. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Hi ALB,

    I tried to use the play() method to play a single sound multiple times in a short interval (0.5s), the sound lasts for 3 seconds. But it turned out that the sound did not play every 0.5s, instead the new instance played right after the previous instance finished.

    Is there a way from c# script to make the same sound source playing concurrently?

    Best,
    Michael
     
  32. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Also if too many sounds played concurrently, it will automatically mix up some sounds which make the volume lower and lower. Could you please let me know is there any parameters to cope with this issue?
     
  33. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I can't turn off the updates messages in the Unity editor Console. I get this message:
    "SoundManagerPro 3 has a new update! Update to version 3.6 in the Asset Store to have the latest and greatest. A big update, which includes the all new SoundPockets! HINT: To disable editor update notifications, go to Tools > Antilunchbox > SoundManagerPro > Turn Off Automatic Update Checks".

    But I have no Tools menu because I have a lot of Editor plug-in assets installed: NGUI, PlayMaker, Prime31, Custom(NguiAtlasHelper) and these all clutter the top menu bar. Also The PlayMaker menu has a Tools submenu that may be interfering with the Tools menus that the SoundManagerPro console message refers to.
     
  34. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey all,

    I'm going to answer these last few questions on the unity forums, but after this--please move all questions/bugs to the new site with new forums:
    http://antilunchbox.com/support/forum/smp/

    Thanks!
    ALB
     
  35. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey TokyoDan,

    It's not possible right now UNLESS you use AudioSourcePro. But it's not possible on the SoundManager itself.

    ALB
     
  36. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Michael,

    I need a bit more clarification of what you're trying to do. Do you want to play the same sound multiple times on teh same Audiosource? So like it would restart? Or are you trying to play 3 different sounds?

    I feel like you should be definitely using the PlaySFX methods, instead of Play. Play is for background music.

    ALB
     
  37. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey TokyoDan,

    If you go to the file SMPMenuItems, change the BOTH MenuItem ("Tools/AntiLunchBox/SoundManagerPro/Turn Off Automatic Update Checks", true/false) to whatever you want. Asset store publishers have tried to agree to put everything under the Tools folder, but some people still don't want to do it. So sorry you have so many menu items =[. Just trying to comply with asset store publisher rules!

    ALB
     
    TokyoDan likes this.
  38. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
  39. michaelmei81

    michaelmei81

    Joined:
    Aug 9, 2014
    Posts:
    11
    Hey ALB,

    I tried to use PlaySFX() and I could play the sound (with same AudioSource) multiple times perfectly.I noticed that the AudioSource instance would be reused for playing same sound repeatedly, which has a pretty good performance. However, if I want to set priority to each playing INSTANCES, I could not do it since all of them belongs to the same AudioSource object. I will set the priority of all instances instead of individual instance.

    Hope you understand what I am talking about. If you do, could provide hints?

    Best,
    Michael
     
  40. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Thanks.
     
  41. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Michael,

    I'm still a bit confused. This is the way the sound pooling works:
    Each audio clip has it's own pool of objects. SFX objects are added to that pool when a PlaySFX function is called and there are no objects available in the pool that aren't playing already. When those objects are done playing, they return to the pool. Depending on what you set as the prepool amount, if the number of objects in the pool is greater than that value, they have a certain lifetime before they are removed from the pool. So if you play certain SFX more than others, it's in your best interest to have a higher prepool amount for those sounds.

    Maybe you could share some code? Also could you move your request to the new forums? I won't be checking here anymore.

    Thanks,
    ALB
     
  42. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
  43. noyeti

    noyeti

    Joined:
    Apr 25, 2014
    Posts:
    18
    I'm having issues with SoundManagerPro, in a very simple set up I play a short 30s audioClip using the SoundManager.Play(clip, true); api. While playing I hit pause in the editor and then try advance the editor to the next frame (the button right of pause). Unity (4.5.3) then hangs (memory is being allocated) and the user is required to end the unity process. If you attach monodevelop and pause the debugger you can see that unity is stuck inside the SMP internals.

    (Also new can't log in to new forum - tried with chrome and IE)
     
  44. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Sorry I was working on Cache improvements on the new site, and it looks it was caching the logged out version of the page. Should be working now.

    I'll check on this bug, I have a pretty good idea what's wrong. I just need to figure out how to fix it. I suspect coroutines have some weird behavior when stepping in the Editor. In the meantime, you can just click "Music Off" option in the Developer Settings on the SoundManager whenever you want to skip. It won't run through that code.

    ALB
     
  45. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
  46. akarsh

    akarsh

    Joined:
    Aug 26, 2014
    Posts:
    11
    hi,
    Will you please help me out .how to remove sound noise in the output of any plugins
     
  47. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Is it everything Ok?

    I posted some question on the official forum for some day and no answers. Should I post them here either?
     
  48. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I have a strange problem!

    After testing some scenes I got the error :
    "Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)"

    And a SoundManager is automatically added on my scene (not the game scene, but the project scene itself)! This is bad, because I already instantiate the SoundManager by code and because of this If I try to run the scene again Unity Locks!

    Any suggestion of how to avoid this?
     
  49. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
    Hi,

    When I use the Playmaker action "Play sf on GameObject", I can't play two sounds at the same time.

    How can I play two SFX at the same time ?

    Thanks !
     
  50. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Is it possible to update to the latest version without loosing all my current settings? And what is the correct procedure?