My game runs on Android using the native app glue so it’s pure C++. I have a very simple java activity that loads fmod:
import android.app.NativeActivity;
public class MainActivity extends NativeActivity
{
static
{
System.loadLibrary("fmodL");
}
}
Then on the C++ side, my sound engine inits like this (and works fine):
System* pSystem = NULL;
FMOD_RESULT r = System_Create(&pSystem);
if (r != FMOD_OK)
{
GP_ERROR("Unable to start FMOD. Error Code: %d", r);
}
r = pSystem->init(128, FMOD_INIT_NORMAL, NULL);
if (r != FMOD_OK)
{
GP_ERROR("Unable to init FMOD. Error Code: %d", r);
}
However, it seems any attempt to create a sound, none of the attempts below work in that createSound returns FMOD_ERR_FILE_NOTFOUND.
Sound* pSound = NULL;
pSystem->createSound("file:///android_asset/res/audio/effects/testSound.wav", FMOD_DEFAULT, NULL, &pSound);
pSystem->createSound("res/audio/effects/testSound.wav", FMOD_DEFAULT, NULL, &pSound);
Is there something I’ve missed?