Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Playing the same sfx multiple times, sometimes one source is louder then the others

Discussion in '2017.1 Beta' started by DMeville, Jun 16, 2017.

  1. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    I wanted to play with some new features in 2017.1 (Physics.Simulate) and after getting that working and upgrading my entire project to 2017.1 I noticed some odd things going on with audio.

    I'm using footsteps as an example, but this happens with all other audio clips. Footsteps happen more often than the rest of my sounds so that's where I noticed it first. Each footstep SFX is a gameobject with an audio source that gets instantiated. Settings (volume, pitch, etc) does NOT change at all. However sometimes, one sfx will play louder than the rest. Inspecting the audio sources they all have the same values (volume), even after hearing one 'pop'.

    See the video for an example. Example project attached, but since it happens so randomly the video might be more useful.



    I could not reproduce this with in a non-beta version of unity, so I'm thinking something changed. I could not find anything relevant in the release notes

    Any idea what might be causing this, and how I might be able to fix this?

    Unity 2017.1.0b9. Windows 10
     

    Attached Files:

    Last edited: Jun 16, 2017
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi DMeville,
    Could you please file a bug report with the reproduction case attached and reply in here with the case #?
     
  3. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Absolutely! Submitted, case# 921686
     
    LeonhardP likes this.
  4. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    I have not tested any Unity 2017 betas - just mentioning in passing... Anecdotally we've noticed this happening in all of Unity 5.x OSX, using both the sound api directly and various wrapper apis.

    Most of the time I notice it on short interface sounds like button clicks/beeps (usually pcm or adpcm decompress on load and left in memory, not streamed or mp3/ogg) - every dozen button presses or so one would play loudly. I never made time to look at it more closely and have not filed any bugs about it. Longer sounds using the same import/usage settings never seem to suffer the same problem.
     
  5. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    @greg-harding Thanks for the info! Seems like it's the same issue, or at least related.

    I tried to reproduce this in Unity 5.5 on Windows 10, and had it playing 1 sound every 0.1s, and let it run for a good 10 minutes without hearing any 'popping' loudness. Could have just been lucky as the popping seems to be random, or maybe it's only an issue on OSX in previous versions of Unity, or maybe my test wasn't thorough enough! Good to know I'm not the only one who has experienced this though
     
  6. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    It's always good to know that you're not going mad all by yourself :) If I get some time I'll do some tests with Unity betas.
     
    DMeville likes this.
  7. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Got an update from the Unity QA team

     
  8. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    Nice. I wonder if it's related to the sound clips being small or using a particular import setting...
     
  9. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    This was actually one of my thoughts. I tried adding (5 seconds of) silence to the end of my short footsteps sounds I was testing with, and the longer sounds still had the same issue!
     
  10. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    Sorry for me being lazy then. I kept putting off making a repro and filing this old bug :)
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Might even get a tshirt out of it for your trouble, who knows!
     
    DMeville likes this.