How to Add Audio Play to my app in Android Studio

I am developing an app using native development in Android Studio, and I would like to add functionality for streaming WAV files. Specifically, WAV files are generated in real-time and need to be played sequentially on the Magic Leap 2 device. I have referred to the audio-input sample app from the C API folder of ML SDK, but I am not very familiar with the functions used in it, as well as how to store and manage the audio data. I am seeking guidance on the C++ code that handles audio playback on the device, or if there are more detailed resources or documentation on audio playback, that would be very helpful.

ML2 OS version: latest
MLSDK version: latest
Host OS: Windows

Since the Magic Leap 2 supports audio playback using the standard Android 10 audio APIs, you can implement your functionality using Android’s native AudioTrack class for streaming and playing WAV files.

Here are some useful links to resources and documentation that can help you with your project: