Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by TheIBPoliceman · Jun 12, 2012 at 05:53 PM · audiosourceaudioclip

Multiple AudioSources overwriting a looping AudioSource

Hey all,

Having a problem with regards to AudioClips and Sources. Essentially, it seems like large numbers of AudioSources overwrite my looping music.

I run my level's music from a looping AudioSource which is pretty simple (at the moment it doesn't even have an attached script). The source has max priority (255) so shouldn't be overwritten by any of the other AudioSources in the scene.

These sources can get numerous though. In the scene I'm testing now, I have four spaceships, each with around 6-8 AudioSources each. Generally they won't all be playing at the same time. I'd estimate that I have a maximum of 16-20 sources playing at once, and the Listener shouldn't be in range of most of them. These sources all have priority 128. They generally play through PlayOneShot().

When playing the level, things start off OK, but eventually the music will get cut off or silenced - the other sounds still work perfectly though. It's getting rather vexing and I don't quite get what could be happening. There doesn't seem to be any real pattern to it other than it happens when a sound plays. Logging the state of the Music source indicates that it doesn't stop or anything.

Does anyone have any ideas? I'd think I might have run into a simultaneous source playing limit, but I haven't been able to find anything concrete (I also recall running a scene without music somewhat earlier with many more sources and no problems).

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TheIBPoliceman · Jun 12, 2012 at 09:37 PM 0
Share

I should also mention that the AudioClips that are being played are mono sounds set to 3D sound, with the exception of some UI sounds that are mono and not 3D. The music AudioClip is 2 channel and not 3D.

In addition, I've now tried fiddling with the compression/load options for the clips to no real change. UI/Effect clips are compressed in memory, music is streamed from disk.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by steinbitglis · Jul 25, 2013 at 07:53 AM

255 is not max priority... it's the lowest.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Help with IEnumerator and if sound is playing 2 Answers

OnTriggerExit stop audio 1 Answer

Instanced Prefabs: Audio clip array out of range 1 Answer

Multiple audiosources 1 Answer

AudioClip.Create crash on Mac OSX 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges