Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Question about 3.5 audio - maximum simultaneous sounds limit

Discussion in 'General Discussion' started by hippocoder, Oct 11, 2011.

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    Hi,

    My audio synth app really has to cut corners quite badly as I can't play many simultaneous sounds. Does 3.5 solve this? I would love a heads up on this.

    I need to ship my app very soon, but it may be worth waiting a bit longer if this solves the problem so people can have a far smoother audio experience when the system is under stress.

    Any word guys?
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    *fidgets uncontrollably and cries*
     
  3. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    You waited 20 minutes to bump a thread about rumors about future versions of the product. Even if someone knew, they wouldn't have had time to find and respond to your post.
     
  4. Feces_Man

    Feces_Man

    Joined:
    Sep 29, 2011
    Posts:
    9
    wccrawford, this thread wasn't even off the first page yet and you already bumped it just to insult one of the most helpful regulars on here for simply expressing, humorously, his anxiousness to know?
     
    Last edited: Oct 11, 2011
  5. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,054
    he waited 23 minutes
     
  6. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    925
    First, perhaps it would be best to ship the app before 3.5? And then release an update if the problem is solved in the future. Maybe this is a bad practice, I don't know. Never released an app before.

    Secondly,

    I couldn't help laugh at Feces_Man's post, not because of what he said. I agreed, but because of the edited section. Notice the reason is "removed death threats"
     
  7. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    I haven't heard anything about sound in the Unity keynotes, or there blog and what not. My guess is that it is a no.
     
    Last edited: Oct 11, 2011
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    23 and 21.6 seconds to be precise. I'm not abusing the forum btw, just being silly :D Amazingly psyched for 3.5. You know, I want this more than ... more than pizza, more than beer. Damn.
     
  9. Tinus

    Tinus

    Joined:
    Apr 6, 2009
    Posts:
    436
    My guess would be that, since both version 3.4 and 3.5 use FMOD, not much will change in terms of voice count. Unless the increases level of access allows you to tweak any artificial limits that might be in place. Like people said above, I don't know of any official word on this. Where 3.5 could help you (provided you have time to put in the work) is that you could write your own samplers/synths and pipe the output into the buffer of a single AudioSource.

    And yes, I share your enthusiasm over 3.5. Gimme! :)
     
  10. jorge.castro

    jorge.castro

    Joined:
    Jul 26, 2008
    Posts:
    139
    maybe you are doing something wrong because in a normal situation, you don't need a to pass the limit of max simultaneous sound.
     
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    this isn't remotely a normal situation, its a synth like nobody's ever seen before.
     
  12. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,681
    If Unity cannot do it, have you thought of accessing the audio buffer directly and writing your own software mixer? Or switching to one of the 3rd party audio modules available?

    If you are feeling adventurous you could create a quick xCode project and link in FMOD to see if you can get regular old FMOD sans Unity to play all of the audio channels you are expecting. I am thinking that the iOS port of FMOD has an inherent limitation built-in to it. Currently doing some research in to this area for you.
     
    Last edited: Oct 12, 2011
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    I've got to make a choice between rewriting it in xcode, then spending time writing a bridge between unity and xcode and so on, I took a peek but since there's still work remaining on the synth and it needs to be out for november (xmas rush and all that, lots more customers) I don't have time to do it. Plus I'd need to unload/load samples on the fly too. Boxed in with this one I think.
     
  14. soren

    soren

    Joined:
    Feb 18, 2008
    Posts:
    123
    Can you elaborate on this? How many are we talking about? (we support up to 32 simultaneous sources, before prioritization kicks in).
    In 3.5 you have access to the raw audio samples and low latency read callbacks. So here you can do your mixing yourself.
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,883
    Hi Søren,

    I am making a music app that plays samples.

    I have to spawn many short sounds, there are up to 32 different objects creatng sounds at any one time, some of them can collide as fast as once per frame, so it ends up with around 80-90 samples in effect at one time in a worst-case scenario and this is with me dropping volume dynamically and removing them as hard as I can to reduce the amount playing at one time. I can't drop sounds any more than I am at the moment.

    In addition to them, the player can play freestyle on the keyboard and there are other extra sounds playing.

    Is there no actual software mixing on the unity side that can help us? maybe fmod virtual audio channels?

    Could you explain how prioritization works? from what I can hear it just means many of them cut off. Please leave tips on best behaviour practises for meddling with the priority myself, should I lower the priority for samples that are "less important" to hear dynamically?
     
    Last edited: Oct 22, 2011
unityunity