Pure Data, Android audio, and random stuff

Noisepages: Websites for smart artists.

A few weeks ago, I decided to add support for OpenSL ES to Pd for Android. OpenSL ES is the native audio API of Android as of Android 2.3 (Gingerbread), and supporting it makes sense since it promises to reduce the overhead that the audio thread has to deal with.

The entire project felt a bit like squaring the circle because it required changing pretty much the entire JNI layer while leaving the public Java API untouched. After all, there are a fair number of existing projects that I didn’t want to break, and I also wanted to make sure that my recent book would remain relevant.

The good news is that I managed to meet those goals, while simultaneously opening up exciting new use cases for the Java bindings of libpd. In particular, the new version of libpd transparently supports all versions of Android. It uses OpenSL when available and defaults to the previous solution otherwise.

I’ll elaborate on the various components in a series of upcoming posts. I believe that some of them may be interesting in their own right. In the meantime, you can check out the upcoming revision of Pd for Android at GitHub. (Make sure to say git checkout opensl as well as git submodule update after cloning pd-for-android.) Any feedback will be appreciated!

8

8 Responses

  1. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

  2. [...] libpd and OpenSL ES, Part I: Squaring the circle libpd and OpenSL ES, Part II: Yet another JACK-like API for Android libpd and OpenSL ES, Part III: Receiving messages libpd and OpenSL ES, Part IV: Extending the API [...]

  3. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

  4. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

  5. [...] libpd and OpenSL ES, Part I: Squaring the circle libpd and OpenSL ES, Part II: Yet another JACK-like API for Android libpd and OpenSL ES, Part III: Receiving messages libpd and OpenSL ES, Part IV: Extending the API [...]

  6. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

  7. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

  8. [...] libpd and OpenSL ES, Part I: Squaring the circle [...]

Leave a Reply