Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » Mobile Apps and Hardware
Thread Read
Low latency audio in Android 4 (Ice Cream Sandwich)
Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next
XGmode
KVRian
- profile
- pm
- e-mail
- www
PostPosted: Mon May 14, 2012 6:28 am reply with quote
It 100% IS an Android problem, all devices have crap latency BECAUSE of the audio drivers and/or OS audio thread priority. Don't be fooled ppl.

And reponse time ( touch > OS registers it ) is really really good on my Asus Transformer TF101 with Android 4.0.3 BUT latency is still the same ( about 90ms ).
I am curious about the latency hack tho, posted here by UltraJv, but for now only for my Samsung Galaxy S.
----
http://soundcloud.com/rph
IRC: irc://irc.freenode.net/##synthedit
-------------------------------------
Registered Synthedit, Renoise, Reaper and FLstudio user!
^ Joined: 20 Nov 2005  Member: #88424  Location: The Netherlands
XGmode
KVRian
- profile
- pm
- e-mail
- www
PostPosted: Mon May 14, 2012 6:38 am reply with quote
AdmiralQuality wrote:

I don't see hacking the OS as a viable solution. We need a sanctioned way to do this so we can sell products to everyone. Not just those willing to tinker.


Agreed, it would be nice if Google would offer official patches/fixes for the latency problem. Or something like a custom installer, where ppl can choose what to use their tablet for and install the best driver setting for that choice.
- You want to make music > install driver with latency 5 / 10ms
- You want to play games and browse > install driver with higher latency and longer battery life.

..whatever.
----
http://soundcloud.com/rph
IRC: irc://irc.freenode.net/##synthedit
-------------------------------------
Registered Synthedit, Renoise, Reaper and FLstudio user!
^ Joined: 20 Nov 2005  Member: #88424  Location: The Netherlands
AdmiralQuality
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Mon May 14, 2012 12:00 pm reply with quote
XGmode wrote:
AdmiralQuality wrote:

I don't see hacking the OS as a viable solution. We need a sanctioned way to do this so we can sell products to everyone. Not just those willing to tinker.


Agreed, it would be nice if Google would offer official patches/fixes for the latency problem. Or something like a custom installer, where ppl can choose what to use their tablet for and install the best driver setting for that choice.
- You want to make music > install driver with latency 5 / 10ms
- You want to play games and browse > install driver with higher latency and longer battery life.

..whatever.


I imagine the large buffers are coming from the Java layer.

By the way, gamers need low latency too. It's nice to hear the gun fire while you can still remember having pulled the trigger. Us music guys owe the gamers so much for bringing down the price of high performance machines.

I bet they could turn it down by changing one value. Right now there's a Java VM that's making an extra conservatively large buffer, just in case.

As for battery life, I doubt it makes much difference. For a second of audio, 88.2 thousand samples have to come out. You can prepare them a quarter second before you hear them, or 5 milliseconds. (Or even less!) The exact same amount of processing needs to get done regardless of latency. Low latency is just less tolerant of a processor that's too busy to respond in a short enough time to fill the next buffer, resulting in the familiar crackle of dropouts.

It would be nice if somewhere in the sound settings the user had access to a latency slider. Then if some older phone/app can't handle the lower latency, no problem, it can run at the old value.

Galaxy Nexus here too by the way, and I haven't timed it yet, but Caustic runs with latency so bad it feels like a fairly long slap-back delay. I'd guess 200 - 250 ms.

And yes, to measure the true latency the record the tap and output trick works.

Or if you want to measure input to output latency, you can run a track out of your DAW (just a loud click will do), through the phone/pad, and back into the DAW. Then count the samples. Of course, you'll want to verify your own DAW's round trip latency before hand so you know how much, if any, it's contributing to the offset.
^ Joined: 10 Oct 2005  Member: #83902  Location: Toronto, Canada
phazei
KVRer
- profile
- pm
PostPosted: Tue Jul 24, 2012 5:27 pm reply with quote
Android 4.1 Jellybean - 10ms latency

http://createdigitalmusic.com/2012/07/android-high-performan ce-audio-in-4-1-and-what-it-means-plus-libpd-goodness-today/
^ Joined: 24 Jul 2012  Member: #284815  
AdmiralQuality
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Jul 24, 2012 5:42 pm reply with quote
phazei wrote:


That's good news! Here's the fixed link...

http://createdigitalmusic.com/2012/07/android-high-performan ce-audio-in-4-1-and-what-it-means-plus-libpd-goodness-today/
^ Joined: 10 Oct 2005  Member: #83902  Location: Toronto, Canada
Calvin J. Abel
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Jul 24, 2012 11:17 pm reply with quote
Hi guys

Well, here are some update, probably not too new, but here are what we have:

1. In the Fireside chat, they mentioned "The 'Fast Mixer' will work with SoundPool, ToneGenerator, and OpenSL APIs", and for Galaxy Nexus is about 12ms.

2. There is no SDK/NDK updates to include the "fast mixer", no documentation, nothing mentioned.

3. Nexus 7 is still with massive latency, roughly about 100ms

Will keep you guys posted.
----
Calvin @ JamUp
iOS Guitar Multi-Effect Processing and Interface
www.positivegrid.com
^ Joined: 28 May 2011  Member: #257608  Location: United States
nikolatesla20
KVRist
- profile
PostPosted: Sat Aug 04, 2012 4:44 am reply with quote
In my experience, all SAMSUNG devices have the worst latency.
^ Joined: 14 Mar 2011  Member: #252505  Location: WI
lion2
KVRer
- profile
- pm
PostPosted: Tue Nov 20, 2012 1:29 pm reply with quote
4.2 Jellybean has done some more improvements in audio latency (if the hardware supports it).

Quote:
Low-latency audio

Android 4.2 improves support for low-latency audio playback, starting from the improvements made in Android 4.1 release for audio output latency using OpenSL ES, Soundpool and tone generator APIs. These improvements depend on hardware support — devices that offer these low-latency audio features can advertise their support to apps through a hardware feature constant. New AudioManager APIs are provided to query the native audio sample rate and buffer size, for use on devices which claim this feature.


http://developer.android.com/about/versions/jelly-bean.html
^ Joined: 13 Jan 2012  Member: #272818  
AdmiralQuality
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Nov 20, 2012 1:47 pm reply with quote
Yeah it dropped by about half when my Galaxy Nexus updated to 4.1. Still not quick enough, but waiting for the 4.2 update.

At least they're moving in the right direction!
^ Joined: 10 Oct 2005  Member: #83902  Location: Toronto, Canada
zendorf
KVRist
- profile
- pm
PostPosted: Tue Nov 20, 2012 3:30 pm reply with quote
The fact that they are are now working on it is very promising! Will be interested to hear feedback on the latency in 4.2 Cool
^ Joined: 21 Apr 2012  Member: #279074  Location: Sydney
penguin42
KVRer
- profile
- pm
PostPosted: Wed Nov 28, 2012 2:55 pm reply with quote
Has no one gotten their hands on a nexus 10 yet? I remember people were rushing to test out latency when android 4.1 came out... I'm surprised things are relatively quiet with 4.2 so far.
^ Joined: 13 Sep 2004  Member: #40568  
TristezaOrange
angelboy
- profile
- pm
- e-mail
- www
PostPosted: Wed Nov 28, 2012 3:01 pm reply with quote
penguin42 wrote:
Has no one gotten their hands on a nexus 10 yet? I remember people were rushing to test out latency when android 4.1 came out... I'm surprised things are relatively quiet with 4.2 so far.


I got 70ms latency on my Nexus 7 with Android 4.2. Better but still definitely not on iOS level.
^ Joined: 20 Aug 2001  Member: #950  Location: Larnaca, Cyprus
AdmiralQuality
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Wed Nov 28, 2012 3:16 pm reply with quote
TristezaOrange wrote:
penguin42 wrote:
Has no one gotten their hands on a nexus 10 yet? I remember people were rushing to test out latency when android 4.1 came out... I'm surprised things are relatively quiet with 4.2 so far.


I got 70ms latency on my Nexus 7 with Android 4.2. Better but still definitely not on iOS level.


Funny, Caustic 2 reports my latency as 48 under in Android 4.1 on my Galaxy Nexus. (It was around 80-something ms when it was still Android 4.0.)

I also just had to cold boot my phone because when I went to check this, Caustic 2 was reporting 178 ms which I knew was way too high. Not sure what causes latency to increase, but something to be aware of if you're testing.

What apps are everyone using to get a number for latency/buffer size? I've been using Caustic 2.
^ Joined: 10 Oct 2005  Member: #83902  Location: Toronto, Canada
penguin42
KVRer
- profile
- pm
PostPosted: Wed Nov 28, 2012 4:29 pm reply with quote
AdmiralQuality wrote:
TristezaOrange wrote:
penguin42 wrote:
Has no one gotten their hands on a nexus 10 yet? I remember people were rushing to test out latency when android 4.1 came out... I'm surprised things are relatively quiet with 4.2 so far.


I got 70ms latency on my Nexus 7 with Android 4.2. Better but still definitely not on iOS level.


Funny, Caustic 2 reports my latency as 48 under in Android 4.1 on my Galaxy Nexus. (It was around 80-something ms when it was still Android 4.0.)

I also just had to cold boot my phone because when I went to check this, Caustic 2 was reporting 178 ms which I knew was way too high. Not sure what causes latency to increase, but something to be aware of if you're testing.

What apps are everyone using to get a number for latency/buffer size? I've been using Caustic 2.


It's definitely hardware sensitive... that's why I'm wondering about the newfangled nexus 10 (and nexus 4) and if they're any better than the nexus 7 or any of the other current crop of smartphones/tabs.
^ Joined: 13 Sep 2004  Member: #40568  
penguin42
KVRer
- profile
- pm
PostPosted: Wed Jan 02, 2013 10:14 pm reply with quote
This is interesting: http://nettoyeur.noisepages.com/2012/12/low-latency-audio-wi th-pd-for-android/

Looks like low latency "support" exists in Galaxy Nexus, Nexus 4 and Nexus 10. This explains the disappointing Nexus 7 performance...

I wonder when more apps are going to arrive that support this? (It looks like it's tricky to enable -- you have to know exactly how to set things for the particular device you're on)

Edit: here's the relevant quote
Quote:
At the moment, only Galaxy Nexus, Nexus 4, and Nexus 10 provide a low-latency track for audio output. In order to hit the low-latency track, an app must use OpenSL, and it must operate at the correct sample rate and buffer size. Those parameters are device dependent (Galaxy Nexus and Nexus 10 operate at 44100Hz, while Nexus 4 operates at 48000Hz; the buffer size is different for each device).
^ Joined: 13 Sep 2004  Member: #40568  
All times are GMT - 8 Hours

Printable version
Page 16 of 17
Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012