i'm trying to run FMOD in WAVWRITER_NRT mode. I was modifying the example bundled with FMOD, but I always get an error on FMOD_System_Init. It says that the file cannot be found.
I thought it would create a file to write output to. I have also tried placing开发者_运维百科 a wav file with that name into that location. Still, I always have this error.
Here is the code:
result = FMOD_System_Create(&gSystem);
CHECK_RESULT(result);
result = FMOD_System_SetOutput(gSystem, FMOD_OUTPUTTYPE_WAVWRITER_NRT);
CHECK_RESULT(result);
result = FMOD_System_Init(gSystem, 4, FMOD_INIT_NORMAL, "/sdcard/fmod/out.wav");
CHECK_RESULT(result);
result = FMOD_System_CreateSound(gSystem, "/sdcard/fmod/test1.mp3", FMOD_CREATESTREAM, 0, &gSound);
CHECK_RESULT(result);
Please help!
Add WRITE_EXTERNAL_STORAGE permission to the manifest.
精彩评论