Before updating to Windows 10 you may need to return your Pro license. More information here

Audio in 3.5 - still buggy, anyone else having similar issues?

Posted on the forum, I duplicate here in case. Am I the only one having these really weird bugs?

1)Hi to all!

Working on a music game for iPad, a project in which a low latency is of course crucial. I figured I would try to lower it once the project is close to completion, and everything is hunky dory except for a few strange quirks:

  • used AudioSettings.GetDSPBufferSize(bufferSize,numBuffe rs) to be certain of the default best latency settings. This gave me 1024 and 4.

  • then set it to 512 and 8 (AudioSettings.SetDSPBufferSize(512,8), to test. In the editor, a simple debug confirmed the new buffer's size. Built to iPad, no sound and the debug now giving me 256 and 4. Back to the editor, I delete the SetDSP line, run again : still 512 and 8. Had to reboot Unity to revert back to the default settings. Build again, debug still shows 256 and 4 on the iPad, but this time the audio is working, and latency has improved.

I'm a bit puzzled! I searched all my scripts, there's only one SetDSP call, and it's commented out. And where does the 256 and 4 numbers come from? Never even tried it. Is that the default setting for best latency on iOS devices? Seems like an extremely small buffer to me...

2)Just ran into another quirk, worse than the last alas!

Since the iPad's sample output rate is 24k, I down sampled all my samples (everything was at 44.1), and set the AudioSettings.outputSampleRate to 24000. No matter where I put the instruction, log and my ears show that when running in the editor, the sample rate stays at 44.1. Tried re-importing all assets, nothing. On the iPad, it works fine, no pitch shifted notes, but all offset values in Play(offset) instructions are still calculated as if the sample rate was 44.1k. It swings a lot, but that's not the idea! Something definitely fishy going around there...

more ▼

asked Apr 15, 2012 at 01:14 PM

avatar image

3.4k 120 90 125

Just upgraded to 5.1, no improvement. Tested thoroughly the Play(offset) behaviour, locked to 44.1 khz whatever the sample rate of the clip. Sniff. Despair. Tears.

Apr 15, 2012 at 02:49 PM gregzo

Where'd you get this information? "the iPad's sample output rate is 24k"

Apr 16, 2012 at 12:06 AM Jessy

@jessy http://answers.unity3d.com/questions/205085/what-is-fmods-audio-mixer-sample-rate.html last comment, and Debug.Log(AudioSettings.outputSampleRate); On the device, that is, in the editor it prints 44.1k.

Apr 16, 2012 at 05:56 AM gregzo

Further searches indicate the comment found in the link quoted above is simply wrong. iPad's output sample rate is indeed not 24k... But why does the Log say it is?

Apr 16, 2012 at 06:27 AM gregzo

Nobody else having these quirks?

Apr 20, 2012 at 07:54 AM gregzo
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Apr 15, 2012 at 01:14 PM

Seen: 1388 times

Last Updated: Apr 20, 2012 at 07:54 AM