Search Unity

Audio CPU spikes when plating audio source

Discussion in 'Audio & Video' started by AndersMalmgren, Mar 11, 2018.

  1. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hmm, updated to 3017.3.1 I though it was editor related, but I get the same problem when built so, its a a showstopper

    upload_2018-3-11_18-40-50.png
     
  2. Marald

    Marald

    Joined:
    Jan 16, 2015
    Posts:
    42
    Hmm haven't run in this issue yet with 2017.3
    Are you doing anything OnAudioFilterRead that could be the cause of the high CPU?
     
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Not for this audio, we do it for our VOIP only.

    Funny thing is, if I fire alot of sounds in shot order only the first sound gives spike. Then if I wait a second and fire again spike is back
     
  4. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    It might be a bug in our spatilization plugin, disabling it now
     
  5. Marald

    Marald

    Joined:
    Jan 16, 2015
    Posts:
    42
    Couldn't it be caching? or decompress on load?, which would only occur the first time, hence only 1 spike and be unloaded GC in a few seconds. Try a wav file if memory isn't an issue.
     
  6. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    We here waiting for Unity 2018.1 to come out of beta while this guy is building his game in 3017.3.1 :O
     
    AndersMalmgren likes this.