cntools / cnfa

Foundational audio drivers
MIT License
32 stars 16 forks source link

Android example #17

Open DavidVentura opened 1 year ago

DavidVentura commented 1 year ago

Hi Could you upload an Android example? I've attempted to do that by just including cnfa/CNFA.h, but getting dlopen failed: cannot locate symbol "SL_IID_PLAY" and am not entirely sure what it is that I'm missing in my link step.

DavidVentura commented 1 year ago

Well, linking OpenSLES and calling InitCNFAAndroid was enough to get audio working, though with the same callback, audio plays ~2x as fast (and pitch is ~2x higher)

Which, after fiddling with the InitCNFAAndroid flags for a bit, I realized it sounds "correct" if I double up the sugBufferSize. Not sure why.

cnlohr commented 1 year ago

There's always mysteries in sound like that!

cnlohr commented 1 year ago

If you can document it a tad that'd be neat.