cancel
Showing results for 
Search instead for 
Did you mean: 

Play sound from native C++ API

Anonymous
Not applicable

I'm planning to synthesise sound in realtime in my naive (openXR) app and then play it. So I'll have a bunch of int16 or int24 arrays to play which will be constantly updated and then submitted to the sound API. Android native uses the khronos audio for continously playing audio. Can this also be used in a C++ program in a native application or what is the best approach? Is there C++ sample code available which plays for example a 1kHz sine-wave?

2 REPLIES 2

berndporr
Protege

I can reply to my own post. Oboe seems to be working. Able to generate the white noise as outlined in the google demo: https://github.com/google/oboe/blob/main/docs/GettingStarted.md

(now back to my proper account, support has sorted it)

Been now using oboe for a while and it's pretty awsome to play sound. The Android C++ assetmanager also is fantastic to load PCM wave files into the Oculus.