Strange (Undesired) Audio Looping with PlayOneShot on Android Lollipop 5.1.1
Hello Community,
My Android game is nearly complete -- However I've encountered a strange glitch with lollipop 5.1.1 My younger cousin was asking to try my game (And Im glad he did)
When he began playing my game, the sounds seem to loop / play at high or low frequencies -- and they don't stop... like ever (unless you leave the app).
Originally, it was just a play(); but then I changed it to playoneshot(sound, vol); that didn't solve it. I then made a bool that catches if you've pressed the button so it really only ever plays the sound once - For sure. I've tested it on other (lower) android versions and it works just fine. So I'm thinking its a lollipop version glitch..
has anyone had this problem yet?
Thanks for your time!
I still cant solve this, Anyone else have this bug / problem?
I am targeting Android 10 and having a similar issue. Sometimes it sounds like it is getting played multiple times in succession and other times it sounds like it is getting stretched. I have double checked PlayOneShot is only getting called once and AudioClip.loop is false, as well. This issue also only occurs on the device, but works perfectly in the editor. This is the only article I found relating to this issue and this unanswered question was asked over 5 years ago. Has nobody found a solution for this?
Update: After playing around, I found out I was using Vorbis compression and decompressing all sound files in my project on load. This was apparently slowing everything down so bad that the sound files could just barely play! Changing it to ADPCM solved the problem.
Your answer
Follow this Question
Related Questions
AudioClip sounding good in editor, but bad in IOS/Android (sounds like a vintage movie robot) 0 Answers
Unity 5.3 Android UI Glitch 12 Answers
Survival Shooter tutorial (aka Nightmares): Move animation issues on Android 0 Answers
Can see the OS of my smartphone through transparent objects in my game (I don't want this) 0 Answers
Game Sound Recording And Save 0 Answers