Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Audio Latency iOS 9.0 about 300ms

Discussion in 'Audio & Video' started by Domunity, Sep 25, 2015.

  1. Domunity

    Domunity

    Joined:
    Sep 25, 2015
    Posts:
    3
    Hi,

    a picture is worth a thousand words. A video is worth a million words.


    I am new to Unity and want to make a music app.
    Initial tests are showing some issues. The Audio Latency is about 300ms on iOS 9.0.
    It is horrible for a music app.
    Is there any way to fix that?

    I'm using AudioClip and AudioSource to play the sounds.
    On update() I check input.getTouch(0).phase Began and play a random sound.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,018
    What is your DSPBuffersize in your audiomanager?

    Also are your sounds compressed in memory? Stream from disk? Decompress on load?
     
  3. Domunity

    Domunity

    Joined:
    Sep 25, 2015
    Posts:
    3
    AudioSettings.GetDSPBufferSize() returns:
    BufferLength: 1024
    numBuffer: 4
    All sounds "Load Type" is set to "Decompress On Load".
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,018
    Go to Edit -> Project Settings -> Audio

    Set DSP Buffer Size to Best Latency

    That should help, not sure if it will be enough.
     
    MrEsquire and Domunity like this.
  5. Domunity

    Domunity

    Joined:
    Sep 25, 2015
    Posts:
    3
    Thanks. It's not yet 100% perfect but solves my problem.
    Since iOS 9 the audio is glitching a bit. Especially on short fast played audio files. But that's another issue.
     
  6. JamieJamJams

    JamieJamJams

    Joined:
    Apr 7, 2015
    Posts:
    8
    I'm having the same problem. The sounds are fine on the computer, but there's too much latency on an iPad. Will be watching this thread. Thanks!
     
  7. yuvalsuede

    yuvalsuede

    Joined:
    Mar 28, 2016
    Posts:
    1
    Hi guys , does anyone have a good solution to sync audio latency , or at least know what it is in a 10ms accuracy?