Problem to read ogg files from obb

Problem to read ogg files from obb


I have a project with mp3, plist, png and ogg files, and package all this files on an obb file, and when I was testing the app all this files read ok except the ogg files.

I changed my gradle config to add to the obb all this files except ogg and change cocos to read ogg files from apk and the app work fine.



did you read ?

Tip: If you’re packaging media files into a ZIP, you can use media playback calls on the files with offset and length controls (such as MediaPlayer.setDataSource() and SoundPool.load() ) without the need to unpack your ZIP. In order for this to work, you must not perform additional compression on the media files when creating the ZIP packages. For example, when using the zip tool, you should use the -n option to specify the file suffixes that should not be compressed:
zip -n .mp4;.ogg main_expansion media_files


Yes, I know it. I do my zip file with compression flag in stored (I do it with gradle before compile), but don’t work.

The problem is when I preload every sounds in the loading screen. If I don’t preload the fx work fine.