What should be reasons to use OpenSL ES instead of AudioTrack in Android?
android, android-ndk, audiotrack, opensl
Solution
OpenSL ES:
Advantages:
- Low Level Audio API in Android
- Device Independent on Android Phones
- Good for Gaming
Disadvantages:
- Supports only on 2.3+ os
AudioTrack:
Advantages:
- High Level API
Disadvantages:
- Works on Java layer and Native code has to call javalayer to play audio.
Problem
Currently I'm using AudioTrack passing to it audio data from native layer to play. It seems I can use OpenSL ES in the native layer instead of AudioTrack in Java. What are the supposed advantages OpenSL ES gives as opposed to AudioTrack?