x


Android touch latency vs. audio playback

Greets - I'm developing a simple rhythm box on an Android tablet and am hitting a snag dealing with a huge latency - easily 200ms if not closer to 400ms, between a "Touch" on a guitexture, and the playback of an attached mp3 file.

The demo program was originally written to test as a standalone Win32 app with MouseDown's so the majority of (what is a dead simple app) appears fine.

The guitexture has an AudioListener attached, and the below script attached as well:

function Update()

{

for (var touch : Touch in Input.touches)

{

if(touch.phase == TouchPhase.Began && guiTexture.HitTest(touch.position))

{

audio.Play();

}

}

}

...priority of these listeners have been bumped up to 255, with effects bypassed. Any thoughts on how to make this detect faster? I can do this in a parallel development in B4A (basic4Android) and get minimal latency, but would prefer to build this in Unity for consistency purposes.

Thanks, Ted.

more ▼

asked Nov 26 '11 at 12:57 AM

laserted gravatar image

laserted
1 1 1 1

Have you found any solution, because I experienced the same issue..

Jan 28 '12 at 07:39 PM Agoston Torok
(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

By RSS:

Answers

Answers and Comments

Topics:

x2477
x580
x475
x154
x7

asked: Nov 26 '11 at 12:57 AM

Seen: 1223 times

Last Updated: Jan 28 '12 at 07:39 PM