Multiple Sounds at the same time

Multiple Sounds at the same time
0

#1

As I can tell from the documentation, It looks like I need to use audioEngine to play music, and Audio Source to play sounds.

However, I dont really know how to play multiple sounds at once.
For example:
BG music on background, walk sound of a character and laser sounds from enemies that can be occur any time.

  1. Should I need to use Multiple audio clips?
  2. Can it be achive in 1 audio clip?
  3. If I have a sound sprite (a long clip with multiple effects inside it) How do I play it multiple time?

#2

Hi. Just play the Sound Effects and Background Music separately. So yes, use multiple audio Clips. Loading/Preloading Sounds is fast enough.

I don’t remember the maximum number of Sounds Effects that can be played at the same time… but trust me… you will never reach this limit.


#3

If you install the example-case project, in the 04_audio section you can find some example for playing multiple sound and music concurrently. if I remember correctly, from the examples, the maximum number of simultaneous channels is 24.


#4

Thank you… Helps a lot