Search Unity

Question buzzing sound in play mode (maybe GPU whining..?)

Discussion in 'Audio & Video' started by SAMM1T_, Aug 13, 2021.

  1. SAMM1T_

    SAMM1T_

    Joined:
    Aug 13, 2021
    Posts:
    10
    Hi all, so my game has been growing and something I've never noticed before is a buzzing sound.
    I wear headphones and listen to music normally while working on my projects, but as I've been adding sounds into my game I haven't had any music playing and that's when I noticed a buzzing noise. Anyway theirs this very annoying buzzing sound that gets loud in play mode. Turning down the volume in windows didnt change anything, but my headphones have a volume knob and when I turn down the volume on them it gets quieter.

    I've seen other people saying they have similar problem but the fixes don't work for me.

    Is anyone else getting/had the same problem? anyone have any ideas on how to fix?

    EDIT: found a simi fix, I created a script and used "Aplication.targetFrameRate = 60;" and that killed the noise. but when I changed the value to 1000 the noise came back. My monitor is 60hz and I have VSync enabled but I still am obviously getting super high frames.
     
    Last edited: Aug 25, 2021
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    i've seen it in few projects also, i think its called coil whine.
    enabling vsync can help, but not sure what else to do..
     
  3. SAMM1T_

    SAMM1T_

    Joined:
    Aug 13, 2021
    Posts:
    10
    ok, and apologies for late reply. How would one enable vsync?
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    project quality settings,
    upload_2021-8-17_11-46-9.png

    although not sure if that helped last time, i think other issue there was too small physics timestep.

    and does it happen in heavy scene or even empty ones?
     
  5. - check on different computer if it stays the same with different hardware, it may be a production issue
    - if the buzzing sound changes or goes away on other devices (especially low power devices), then it is a hardware issue with your setup
    - check audio drivers too, make sure they are updated

    The fact that the windows knob didn't change it, but the headphones did tells exactly nothing, other than the speakers in your headphones are probably okay. Everything else is potential problem. Including your motherboard, sound chip/card, videocard and PSU.

    Also check your source audio clips outside of unity. This way you can isolate the issue if it is hardware or Unity processing issue on your hardware.
     
  6. SAMM1T_

    SAMM1T_

    Joined:
    Aug 13, 2021
    Posts:
    10
    it is happening in an empty project as well.
     
  7. SAMM1T_

    SAMM1T_

    Joined:
    Aug 13, 2021
    Posts:
    10
    I dont belive it will be a hardware issue because its only ever happened in unity. I also dont have another computer to test it on which is annoying.
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    Coil whine typically comes from the graphics card itself, it doesn't really travel through speakers / headphones.

    This sounds more like the area around the headphone jack isn't properly insulated and when power draw happens it caused interference and an audible buzz.
     
  9. SAMM1T_

    SAMM1T_

    Joined:
    Aug 13, 2021
    Posts:
    10
    Ok ill look into that. maybe try with some other heaphones
     
  10. Baydogan

    Baydogan

    Joined:
    Mar 22, 2018
    Posts:
    54
    Turn V-Sync On.

    On the game window

    Screenshot at Feb 25 04-43-13.png
     
    Last edited: Mar 16, 2024
    kdserra, KakaoAnt, max_shayne and 2 others like this.
  11. so_-phil_is_it

    so_-phil_is_it

    Joined:
    Oct 3, 2023
    Posts:
    1
    Did the headphones end up being the issue?
     
  12. KalUnity3D

    KalUnity3D

    Unity Technologies

    Joined:
    Jul 17, 2020
    Posts:
    17
    Can you doublecheck this isn't a hardware issue?

    I've only noticed this with 1. Unbalanced cabling for amp/dacs and 2. onboard audio (or even soundcards) where there is interference.

    You should troubleshoot this by trying it out on a different setup (different computer, different headphones, bluetooth headphones etc.).

    If indeed after that it is a Unity issue, then you can submit a repro.
     
  13. KakaoAnt

    KakaoAnt

    Joined:
    May 11, 2020
    Posts:
    7
    This is what helped me. Just enabling V Sync in project settings doesn't turn it on in game mode it seems like. Thanks for help, whining is gone on laptop, and PC doesn't make extra noise neither. The problem only happened in editor play mode.
     
    Baydogan likes this.