What are my options for playing simultaneous audio on an Android device with the least amount of latency? Am I going to get anything half decent out of the canned SDK, or i
Please see my answer to Android: sound API (deterministic, low latency).
The latency of an Android device depends less on the API and more on the hardware and drivers for that particular device. Enabling low latency playback consumes more power and increases the chances of audio glitches, so many OEMs will enlarge their playback buffers intentionally.
A number of people are interested in low-latency audio on Andriod. Here are the threads I'm following on the topic:
This post suggests that Android devices have ALSA drivers (capable of low-latency audio)--but it seems that low-latency functionality isn't exposed to apps via the NDK.
I have no direct experience with Android, but from what I've read, low-latency (less than <10ms or so) isn't a reality yet. Please post any experience to the contrary!
I don't have any Android experience, but I've written similar things for Windows Mobile. The devices themselves are certainly capable of mixing multiple sounds in real-time with a low latency (under 25 ms), although by "multiple" I mean maybe 4 or 5 (and not 30 to 40). However, I was only able to achieve this satisfactorily by writing my own code that did the mixing internally and accessed the low-level audio playback API only for playing the final mixed output. The higher-level ways of playing sounds in the .Net Compact Framework are theoretically capable of polyphony, but in practice they work horribly (lots of glitches, stuttering and distortion).
I suspect that the Android audio SDK has the same problem, so you may have to write your own.
Android 2.3 now supports native access to audio APIs (via OpenSL) for low latency applications.
However, not all hardware devices will have the a low latency audio feature profile. Thus applications requiring low latency audio shouuld filter devices not supporting it in the Android market by specifying the following in the manifest:
<uses-feature android:name="android.hardware.audio.low_latency"/>