I am fiddling around with OpenAL again, and I found a really nice 8 minute space themed music track on OpenGameArt.org. Now I want to decode it and play it. I believe my decoding works, but I was looking into streaming it because it is so massive.
The sound decodes about 2mb, which causes some Heap memory errors among the bigger goal.
What I would like to do is:
- Decode all of the file into a ByteBuffer
- Write it in chunks to a circular OpenAL buffer
- Play the sequence of OpenAL buffers
I have looked into how LibGDX does it, so I understand that it involves the usage of two core commands:
However I need some help understanding exactly how to use these commands to achieve circular buffers and play the 8 minute ogg file. Any help would be appreciated.