oboe

Play sound with Oboe with .obb file


Hello sorry I'm begginer. I don't have my sound files in my assets folder but in my .obb I'm using the RythmGame sample who is using only assets folder. I'm trying to use DataSound but only AAssetDataSource is used in my sample for create a DataSound. I look at Asset and NDKExtractor for the decode function, but can only be use with an AAsset from an AssetManager... How can I play sound from an .obb with Oboe ? Can someone help me with that problem ?

Thanks


Solution

  • You should be able to do this by getting the path to your expansion file and passing that through JNI to your native code, opening it as a normal file object and passing the contents to the extractor.

    You're right about the NDKExtractor::decode methods - they take an AAsset *, however it should be pretty easy to update them to take the file descriptor from your open file instead.