I want to play an audio file in .wav format using AudioTrack and C++. I have searched for it a lot but I couldn't find any relevant tutorial.
The only I could find, were all using Java/JNI layer. I want to do it at the native level in C++.
Something like :
file = path_to_file
play(file)
Please point me to some good tutorial if you are aware of or please provide me some code snippets to get the idea.
Your Native Code (NativeCode.cpp) should look like below: *Include required header files and libs.
Your Java Code should look like below snippet: Call to start the native audio streaming:
And Callback Implementation: