Search code examples
androidcaudioandroid-ndkopensl

audio capturing/rendering in native code on android


I am looking into clearing up my confusion on how to capture and render audio using native code on the Android platform. What I've heard is that theres an API for audio called OpenSL. Is there any recommended guides and tutorials on how to use it?

Also, is there any good audio wrappers for OpenSL, such as an OpenAL wrapper or something? I've developed the audio part with OpenAL on other platforms, so it would be nice to re-use the code.

Is there limitations to OpenSL - like, something that has to be done in Java code?

How much does OpenSL differ to OpenAL?

Thanks!


Solution

  • There's a native audio example included in the samples/ directory of recent ndk releases.

    It claims to use OpenSL ES