I’m testing a Windows stand-alone on a Dell Vostro 1500 (standard audio system, what Dell calls their “High Definition Audio 2.0”) and I’m getting a “clicking” sound whenever the application plays an audio file. Anyone else experience this? I don’t get this with any other application on this system and I don’t get this issue on other systems I’ve tested. Any ideas what’s causing this and how to fix it?
Please define what kind of clicking sound you mean. If it is an intermittent sound that occurs throughout the play time of the clip, then that’s just a standard Unity audio issue, which every game is prone to on every system. If what you mean is “when an audio file starts playing, there is a click right at the beginning that happens one time”, then you need to fade in the audio file, because the waveform isn’t starting at a zero crossing.
Good question. Because the notebook is only 2 weeks old and is running XP, I just assumed the drivers were up to date, but I need to verify this…
Huh? Been using Unity for quite some time now and I don’t ever recall hearing anything about a “standard Unity audio issue”. At any rate, it’s not happening on my Mac boxes and this Dell notebook is my only Windows box at the moment so I can’t compare results on other machines.
Standard unity audio issue? Ugh! Haven’t seen or rather heard something like that before. Don’t have any trouble playing sounds myself. This goes for long soundtracks as well as quick bursts of sound effects.
bigkahuna:
Post a webplayer link so we can test on more setups? Otherwise report a bug with unity and have them test it out.
I’m looking for posting history, guys. It seems to be a perceptual thing. I think I have yet to play a Unity game without crackly, improper audio, but when I have other people listen to the same thing, not all of them can hear it. I don’t think I have particularly fantastic hearing; I can hear higher frequencies than average, but this clicking business is not in that register, and most speakers/DACs can’t put out material that high anyway.
The effect is not disgustingly terrible; it only really matters during prolonged non-“noisy” sounds, e.g. music.
A guess from this end would be that the game logic could be occupying too many cpu cycles for the audio to play properly. To test this - try implementing a sleep in your update and see if that changes things.
Maybe I’m experiencing what Jessy is talking about. It sounds like a “crackling” sound that loops with my audio (which also loops). First time I’ve run into it, too. The Dell site alluded to updating video drivers as a solution (?) which I did and had no effect. The latest audio drivers are 10 months old, so I’m guessing it might be a “Dell doesn’t like Unity” issue?
Yes, I do have a lot of physics / rigid body activity going on in my project, but haven’t run into this before. Going OT slightly, I have experimented with rigidbody.sleep but haven’t had much luck getting it to work. The cause, I’m guessing, is because I’ve got multiple forces acting on some RB’s.
The biggest problem I have trying to display this issue, is that it is not predictable. Computers of various types, speeds, audio setups. and background activity, SOMETIMES have the problem. Other times, they don’t! If it’s going on when you begin, it will continue to do so, in my experience. I’m going to try to keep better tabs on this so I can contribute more helpful information.
The weirdest thing I’ve seen so far is with Epic Tower Defense on shockwave. There was about a week’s span when I was playing that game for hours every day, and after a while, sound from one of my laptop speakers would go away completely, with a nice loud blast to alert me when it was dying. Restarting the computer would fix it, fortunately. I never had an issue like that with any other application.
If this is indeed caused by a heavy physics load then perhaps this reveals an engine flaw / needed feature of unity. Graphics quality scales with hardware, but is that also the case of physics?
Indeed is that at all possible? If so then any ideas on how this would be achieved?
Might be getting a bit off topic here as we haven’t properly determined the cause of the problem, but I find it a very interesting topic.
At least on OS X I believe the audio system is realtime in the technical sense (i.e., guaranteed to be executed by the OS), so I don’t think it’s possible for excess physics or anything else to affect the audio to the point where it gets interrupted. The only clicking I’ve heard with Unity is with sounds that don’t quite loop cleanly, but that would be a problem anywhere. Definitely no “standard” Unity audio issues, and I do have quite sensitive hearing (which sometimes is kinda unfortunate…).
So then if the sound itself didn’t loop cleanly, wouldn’t the clicks be heard on any system it was played on? I have an iMac, MBP and now Dell Vostro 1500 that I’ve tested the app on and the only one that has the clicking is the Dell.
I can attest to one of my own game’s audio suffering due to processor load. Before I knew about ambient lighting, I put a ton of lights in my scene, and the audio suffered, despite it being in a pure playback state. The Puca race game audio glitching that AngryAnt posted about in the thread I linked to is the exact same issue, if it’s what I heard from that game. And this is Wndows and OS X. Despite this not always happening, I’d like to think that when it did happen, it would be quite noticeable to everyone, but I simply haven’t found that to be the case.
…and yes, I have gotten some verification from people perhaps a little saner than I am. :shock:
Can you maybe get us an audio sample? I’m sorry, but I don’t know of a good tool for that on Windows…any suggestions?
Yep, as I said, “but that would be a problem anywhere”. Also Jessy seems to be saying that it’s not just a problem with looping. I wonder if that has anything to do with OpenAL, which seems to contain a certain amount of flakiness, possibly only on certain systems? If that sort of thing was common on all systems, I would notice it, as it would probably be like fingernails on a blackboard to me. Even the wrongly positioned 3D audio was bugging the heck out of me until they fixed it.
Wow, I’m actually pretty surprised at how many other people who have run into the same or similar issues with audio in Unity. Has anyone found any sort of pattern to what might be causing this or what systems typically are effected (ie. only PC’s or only low end audio)? Is there anything I can do that will make certain users don’t run into this issue (short of removing all audio)?
Maybe if your team complains at OTEE about this, that will carry some weight. I’ve got some fun stuff on the horizon, but for now, I’m just a local crazy sound geek. That’s exactly the issue though - a “crackling”. If I had to guess, I’d say that Unity’s audio engine starts to stutter, and where you ought to have useful samples, you get digital zero for the equivalent of a few samples. A jump down to nothing like that, or up from it, is usually going to result in an audible clicky sound.
I think next time I hear this, I’m going to send it out via Soundflower to Logic, so we can definitively see what is happening. If someone else gets to it before I do, great. Let’s just keep each other updated.
“Complaining” gets you nowhere, logging bugs is what will help and that’s what I’ve asked of you and I don’t recall you telling me any bug numbers. Have you done that? We need reproduction cases for bugs and problems to help speed fixes along.
@Matt: I assume you’ve logged those as bugs? If so then please drop me a line with those so we can see about taking care of them.
Here’s the problem! Since I was told to do so, nobody’s been providing me with games that I want to play at length! Before that, I didn’t realize it wasn’t a known issue. So, I realize now that I will have to go digging for it.