Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Sound crackling issue on Mac

Discussion in 'Editor & General Support' started by Benj-dd, May 29, 2009.

  1. Benj-dd

    Benj-dd

    Joined:
    May 15, 2009
    Posts:
    2
    Hello,

    I have a major sound issue on the game we are curently developing with Unity. When I run a MAC version of the game (in the editor or in a build), sound crackles randomly (but often) pop and alter the audio experience in a very bad way. This appears when a few audio clips are playing as well as a lot are playing simultaneously.
    It makes no difference if my audioClips are compressed or not, mono or stereo, decompressed on load...

    It seems to depend on the cpu ressources used by the game. There are more crackles when the cpu consumption is high.

    Notice that there is no audio problem on the pc version of the game (and even with cheaper computer that the MacBook and the IMac -OS 10.5.6- we used to test the game)

    Do someone experimented simular issues or have an idea to figure out this problem?

    Any contribution would greatly appreciated :)

    Benj
     
  2. soren

    soren

    Joined:
    Feb 18, 2008
    Posts:
    123
    Hi Ben,
    Can you report this as a bug and attach a project, which reproduce the crackling?
    Do you loop the sounds? we are aware of a problem caused by the quicktime importer, which omits some samples at the end of the clip. This can lead to crackling and pops when looping (this will be fixed in the next release). Also, do you change volume and/or pitch frequently? Lastly, if your game is really heavy on the cpu the audio thread could be starving (esp. with a lot of aud.sources), also leading to crackling and pops.
     
  3. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Please search the forums, and you will find several other threads on this topic. It is not unique to OS X, and it doesn't happen on everyone's computer, but it happens on every computer with which I have used Unity, except my iPod touch.
     
  4. Benj-dd

    Benj-dd

    Joined:
    May 15, 2009
    Posts:
    2
    I looked over other threads regarding this topic, and I guess the problem comes from the high cpu load.
    No particular issues at loop point, and the problem occurs whether or not I do frequent volume or pitch updates.
    Sadly I can't really do more cpu optimization on this project without degrading too much the game. I hope this will be fixed in the next version, but is there any tweak to minimize the crackling effect until the new release?

    Soren, I sent a bug report, but couldn't attach the poject due to its size
     
  5. soren

    soren

    Joined:
    Feb 18, 2008
    Posts:
    123
    using decompressOnLoad should definitely lift some work off the cpu (with the cost of more memory usage) and of course limiting the total count of simultaneous playing sources.
     
  6. CrystalVisions

    CrystalVisions

    Joined:
    Sep 11, 2007
    Posts:
    61
    I just discovered this problem yesterday. I have been testing my web player on windows, but decided to see how it would work on Safari on my Mac Book Pro - Horrible sound! This is a show stopper for me - when do you think this problem will be fixed?
     
  7. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    I reported sound issues back in 1.6 that carried through on all releases. I can trace this issue as far back as 4/2008 (Case 21469, closed, unable to replicate, although they did hear it only very briefly)

    Its not something they can fix really, it has to do with the audio encoding / decoding and playing, and mainly happens on Mono sound. It is how they have had threading setup for the system for ages. (well ok, ages I mean over a year ago when I first noticed it)

    It isn't to noticeable on all machines, and it largely has to do with your memory / CPU. The more memory the target machines have and the more powerful they are, the less likely they will ever know it is happening. Sound also has a habit of just simply cutting off when you play to many sounds. The only solution I found to this problem was to create a thread for every sound effect I wanted to play, which turned out to be a memory hog after a while.

    I submitted a bug (as noted earlier) a year ago, didn't get it resolved then, doubt it will get resolved now and we are a major release beyond when I submitted my bug. Since it has been a problem (although ever so slight and hardly noticeable) since v1.6

    It is worse in web builds, take the project you notice the sound crackling in, build it as a web build and deploy it and test it remotely. Then you will really notice it. I think it also has to do with something about the sound files over 1 meg in size (ogg or otherwise)
     
  8. gads

    gads

    Joined:
    Oct 10, 2008
    Posts:
    34
    Just to say that I also have this sound issue. Fortunately the last project I have built with Unity was to be executed on Windows and because of that we didn't worry too much with this issue.

    Now, I'm having an hard time to solve this issue.
    As Benj-dd said, I've tried all combination of options (compressed, uncompressed, mono, stereo...). I don't know what I could do more to solve it... :cry:
     
  9. carnevalle

    carnevalle

    Joined:
    Jun 25, 2009
    Posts:
    39
    I just want to report, that I am experiencing the same problem of crackling sounds. I am using Windows XP and even though I am just using placeholder sounds for now, it is really ruining the experience.

    I have an exploding sound effect which sounds nice and smooth when played in an external player, but when played in Unity it just crackles and sounds distorted.

    :-(
     
  10. chrono1081

    chrono1081

    Joined:
    Nov 15, 2009
    Posts:
    14
    I'm still having the same problem on the latest version of Unity : /

    The sounds will import find usually but over time the crackling begins and the sound sample gets ruined. Reimporting does nothing.

    Has anyone found a fix yet?
     
  11. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    I had weird sound issues yesterday and after several hours of recoding and reimporting in all settings mode I went to Sound Manager and put the stereo off of dead center and it cleared up immediately. WTF??

    Bluster
     
  12. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    Unity 3.0 beta pro here and I still get the sound pop / bang before my clip randomly. Sometimes it plays fine others it pops.. It seems to almost always do it the first time the sound plays and after that gets better. Unless there is a way to tweak with the new 3d sound issues it seems like the problem is not on the list of items to fix.
     
  13. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    493
    yep, u3beta4 , lots of snap crackle pops.

    its sad because there's only one sound in the scene.

    use the reverb/echo and its even more noticeable because it gets repeated.

    please fix, this is horrible.
     
  14. mustafa_d

    mustafa_d

    Joined:
    Dec 15, 2020
    Posts:
    11
    It's been more than 10 years and this problem is still not fixed??? Such a messed-up situation