Guinea Pixel
Playing Together
  • email
  • facebook
  • twitter
  • google
  • youtube
  • Games
  • Arduino & 3D Printing
  • Contact
Select Page ...

Mobile Audio Latency & Unity Android

Mobile Audio Latency & Unity Android

Guinea Pixel September 19, 2016 Development, Tips & Tricks 1 Comment

As all mobile Unity app developers know, making an app that relies on audio response isn’t an easy task to do, due to Mobile Audio Latency.

Hopefully my steps on how I approached the challenge will help other Unity developers.

Improving Audio Latency

iPhones and iPads, in most cases, are just fine and will have great response by using the normal Unity Audio engine, but Android in the other hand, is quite a challenge.

First Phase Test

Create a normal button with an AudioSource Component and loaded AudioClip
Add a touch event to simply play the AudioClip with the AudioSource component
Build Android and iOS
You will notice that iOS will be fine and Android is quite disappointing.

Second Phase Test

After a lot of research & hair pulling, I managed to find a couple of gems.

  • Superpowered SDK – A good read & understanding
  • Android’s Native Sound Pooling

If you don’t have time to write your own Android plugin to get access to Android’s SoundPool – you can always buy this super handy asset from the Unity Asset Store : Android Native Audio

  • Add an audio file to the StreamingAssets folder
  • Create an audio pool via the SoundPool and add Audio file
  • Create a normal button
  • Add a touch event to play the audio file via the Android Plugin’s SoundPool
  • Build Android

You will notice that the response time has greatly improved.
Even by using Android’s Sound Pool it will still have some latency, due to the hardware’s “round-trip” issue…

Android Round Trip

(Image Reference Superpowered SDK)

The Results

I used a Samsung Galaxy Note 4 for my Android testing VS an iPad Air – I got the same latency results. -This will definitely vary between Android devices.

Here is a Solo I made using my Rock Guitar Solo app :

If any one has a better approach please let me know 🙂

← Press Release – 31 May 2016
Guinea Pixel

I make games, love games and enjoy everything about games! I have dedicated my life to play, develop, design and simply enjoy games.

  • Archives

    • September 2016
    • May 2016
    • December 2014
    • November 2014
  • Pages

    • Home
    • Blog
    • Newsletter
    • Games
      • Rock Guitar Solo: Privacy Policy
    • Contact
    • Dude Dancer Preview
    • Survival Jungle Run: Privacy Policy
    • Awesome Space Shooter: Privacy Policy
    • Retro Pixel Smasher: Privacy Policy
    • Ultimate GIF Maker: Privacy Policy
    • Building Stuff
      • Best Phone Mount! 3D Printed using Creality CR-10
      • Stop Smoking Device! Arduino Controlled!
      • Guitar Speed Pick and Stomp Pedal
      • RC Octane with an Angle Grinder! Tribute to Rocket League!
      • Anti-Gravity Experiment 01 – Neodymium Magnets at 13000RPM
      • Tazer DIY – Shock your friends!
    • Be the first to play our games!

      Stay up to date with our latest games and be the first to download and enjoy.

    • Games
    • Arduino & 3D Printing
    • Contact
    Copyright © 2016 Guinea-Pixel.com. All Rights Reserved