Search Issue Tracker

Fixed in 5.0

Votes

15

Found in

4.3.0f4

Issue ID

579203

Regression

No

Audio.PlayScheduled produces artifacts on cpu spikes

Audio

-

To reproduce:
1. Import package the "repro"
2. Open "scene"
3. Enter play mode
4. Press space. it should call "audio.PlayScheduled" and play the sound after 1 second, but it sometimes plays a small part of the sound instantly, which should not happen. This is due to a cpu spike (in this case caused by debug log calls)

Comments (10)

  1. 3753597812ec2f65a1ee3b42d5097caf?d=mm

    Wyern1

    May 10, 2016 18:03

    I'm having the issue on Unity5.1 Android

    I found out another workaround which is using LoadInBackground as if it were preloaded: http://answers.unity3d.com/questions/971559/why-does-audiosourceplayscheduled-play-for-an-inst.html#answer-1184468

  2. 5d1b209126003b73b2eaf8d98f6d1a10?d=mm

    Mumumurilo

    Oct 23, 2015 16:12

    Still having this issue on 5.1.0f3. On Android, it plays for milisseconds, then stops, and then continues from where it should continue. This issue is making the song of my game playing too badly on my phone.

  3. 008a0f55b695aa2852ca9e2bdd8e2858?d=mm

    Nidre

    Oct 07, 2015 19:26

    I can still this issue on 5.1.3f1.

    A partial workaround can be found here: http://answers.unity3d.com/questions/971559/why-does-audiosourceplayscheduled-play-for-an-inst.html

    The workaround creates another issue, less ever then this one.

  4. Be35f59bec82281d2df7c60526b65a0a?d=mm

    Totoro83y

    Dec 16, 2014 03:04

    I confirm the problem with 4.6.1. But now is less severe, I have the problem only with the android building, the editor works great now (it wasn't the case with unity 4.5).

  5. 6db700bbcfb1d7e6ae24f2864d65ac87?d=mm

    allenwp

    Jun 25, 2014 19:59

    I'm trying to create a rhythm game for android. On some PC it works great, but on my laptop I get this problem. On android I also get this problem. Logging seems to trigger the problem on PC, but it occurs regardless of logging on android.

    Please let us know the progress on the issue -- I'll need to scrap this game or use a different engine altogether with this bug present.

  6. 16835f1f4cb74cc725991486b847443c?d=mm

    Nifflas

    Jun 20, 2014 12:57

    I've had this for a long time, and it's really getting in the way for my music work in Unity.

  7. 90e521d70d21079a7e9b989c1b409621?d=mm

    churi24

    Jun 19, 2014 17:21

    Im using Unity 4.5 0f6

  8. 90e521d70d21079a7e9b989c1b409621?d=mm

    churi24

    Jun 19, 2014 17:05

    Im having this problem too.. Im doing a sequencer and on my pc works fine, but on Android sometimes plays a small part of the sound instantly before.

  9. 13f0f2d5d10726cf0ddec5fc239b1d14?d=mm

    apparition

    Apr 17, 2014 17:37

    I'm experiencing this issue as well and it's definitely a regression. I believe it was introduced in version 4.1 or 4.2.

  10. 4e7f1611e0b58fffcd39ae79011f5290?d=mm

    MrJayFero

    Apr 07, 2014 21:55

    I noticed this as well. My workaround was to set volume to 0. Once the clip has passed this initial load period you can set volume back to your default volume and PlayScheduled will work fine.

    But PlayScheduled also hiccups occassionally. I'm not sure if this is a buffering issue or not. If it is a buffering issue I haven't figured out a workaround to guarantee pre-buffering in time.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.