Google Android Development Agency SASS

Friday 27 November 2009

Android AudioTrack source

I've been doing a lot of work optimising our audio playback on Tub Thumper Pro for Android this week and I constantly find myself referring back to the C++ source for the OS to help solve latency issues.

For anyone doing work with the AudioTrack object, it's worthwhile bookmarking the source online so that you can browse it whenever you hit a problem.

Here's two links I find really useful:

Incidentally, I've found that the best way of getting low-latency polyphonic audio is to subclass AudioTrack and call finalize() yourself after you're done playing; I was seeing more "write blocked for xx seconds" messages before I did this, although it may be co-incidental.

No comments:

Post a Comment