Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 is that asking too much? The documentation claims that the SoundPool class is capable of playing multiple sounds simultaneously with relatively good performance, but after running some tests in the emulator and on a physical device it seems pretty weak. Is there maybe a trick to it, or do I have to go to a much lower level api for this kind of thing? I've tried using a single sound pool with multiple samples loaded, and I've tried multiple sound pools each managing a single sample. I'm preloading everything, so that when I attempt to play back I have no additional code being executed other than the call to SoundPool.play().

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
332 views
Welcome To Ask or Share your Answers For Others

1 Answer

A number of people are interested in low-latency audio on Andriod. Here are the threads I'm following on the topic:

  • A wave covering audio related topics from this year's I/O conference.
  • An Android issue about support for low latency audio in the NDK.

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...