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
1
Question by cassius · Oct 06, 2013 at 12:16 AM · audioaudiolistenerawake

Strange Audio Output During Awake()

I updated to Unity 4.2.1f4 a few weeks back. Some of my game levels perform a lot of preparation work within the Awake() function, such as resource pooling of weapons, enemies, explosions, etc. It currently takes 12 seconds for the Awake() to complete.

My problem is that there is a lot of crackling sounds and partial audioclip sounds being output to the speakers while the Awake() is building the scenes. This happens even if I turn off the AudioListener in the scene. It even still happens if I completely remove the AudioListener gameObject, which seems crazy to me.

Has anyone else experienced this or know what may be causing it? None of the previous versions of Unity have given me this problem.

Comment
Add comment · Show 9
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 cassius · Oct 06, 2013 at 05:43 PM 0
Share

I moved my level preparation work into a coroutine started by the Awake() function in hopes that it'd handle things a little better and stop this audio problem. However the issue was still present.

Just now, I decided to deactivate all the level's prefabs in the Project view. According to Unity's Execution Order page, Awake is called just after an prefab instantiation and if it is not active as a prefab, Awake is not called until it becomes active. So basically I have disabled the enemy, weapon, and explosion prefabs. The audio issue is still somewhat present (perhaps because I've still missed a few prefabs), however the level's load time has dropped from 12 seconds to about 0.5-1.0 seconds. Wow!

Of course that makes sense because the objects and their components aren't all being initialized at once. But what doesn't make sense is that even if all prefabs are active upon instantiation, why without an audio listener their audio components would still output to the speakers.

avatar image Jamora · Oct 06, 2013 at 06:15 PM 0
Share

What you heard might not be actual AudioClips playing. If what you heard was maybe buzzing and crackling (which you mentioned) it could just be the current in the motherboard inducing a current on your sound card, thus producing output. $$anonymous$$aybe you have an issue like this one with sound from a hdd 'leaking' to a sound output.

If what you heard were parts of an actual AudioClip (music... or maybe speech) then it's possible you had PlayOnAwake set to true. Though nothing should be heard if you have no AudioListener in the scene.

avatar image cassius Jamora · Oct 06, 2013 at 08:57 PM 0
Share

Thanks for the reply, Jamora. However it is indeed parts of the actual AudioClips as I recognize both some of the sounds it makes and it also plays very brief (fractions of a second) of my game's music too. I do have PlayOnAwake set for many of the audio clips. But as mentioned, it occurs even with no AudioListener enabled or even in the scene.

avatar image meat5000 ♦ · Oct 06, 2013 at 07:21 PM 0
Share

$$anonymous$$aybe what you can hear is the audio listener from the previous scene being destroyed?

avatar image cassius · Oct 06, 2013 at 08:58 PM 0
Share

At this point there is no previous scene so there is no previous audio.

I should point out that this is occurring both in Unity and also in the standalone player as well.

avatar image meat5000 ♦ · Oct 06, 2013 at 09:04 PM 0
Share

Did you remove the listener from the main camera?

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple audio recorders like Audio Listener. 0 Answers

Audio Listener Tiny Unity (Spacialized audio ?) 0 Answers

Pitch changes when i get closer to object with audio source 1 Answer

Make Sound Effects Not Audible Unless Near Them 2d? 1 Answer

Sound volume: How to ignore distance between source and listener? 2 Answers


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