문제

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!

도움이 되었습니까?

해결책

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

It claims to use OpenSL ES

다른 팁

OpenSL and OpenAL differ quick a bit in terms of interfaces. However, they do have a very similar pattern and the use case is similar too. One this to be aware of is that in the current implementation OpenSL suffers from the same latency issues the java audio apis have.

When using OpenSL you don't have to call any Java code. The latest NDK has support for a native asset manager so no more going through JNI to pass byte arrays around :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top