0
0

I saw in all examples, the audio files are supposed to be put at some external folders like /sdcard/fmod/
Can fmod open audio files inside the .apk package ?

I tried to use FMOD_EventSystem_Load with the file path in apk, it failed with FMOD_ERR_FILE_NOTFOUND

So, how do I read audio files inside apk ?

  • You must to post comments
0
0

I’m also having the same problem.
I’ve put all my .ogg files in the assets folder and prefixed the filename with "file:///android_asset/", but I’m still getting the FMOD_ERR_FILE_NOTFOUND error.

eg. result = s_system->createSound("file:///android_asset/sfx.ogg", mode, 0, &sound);

Is there some sort of conflict with using the asset manager elsewhere? Do I need to set something in the manifest file?

BTW: I ran the eclipse example play_stream and it worked fine. I really can’t tell what the difference between the example project and my project is.
ALSO: I am able to get FMOD sounds playing if I load them into memory, but I want to use the load by filename functionality (esp for streaming)

EDIT: Problem solved. I wasn’t calling FMODAudioDevice.init(this);. What a dork.

  • You must to post comments
0
0

Glad you solved it, unfortunately there is no NDK API for fetching the asset manager so we need that little bit of Java code to glue certain functionality together.

  • You must to post comments
0
0

FMOD4 has no way of doing this, you would need to use the asset API to fetch the file yourself, then give it to FMOD as a memory pointer or provide file callbacks.

FMOD5 (FMOD Studio) has this functionality built in, just prefix the filename with "file:///android_asset/" and it will load.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.