0
0

Since I couldn’t find an iphone distribution example of recording fmod output to disk, I tried to write it myself, but can’t make it work yet. Should I persevere, or is this a known limitation?

Code snippet that fails:

NSString* path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/fmodoutput.wav"];
[[NSFileManager defaultManager] createFileAtPath:path contents:nil attributes:nil];
result = system->setOutput(FMOD_OUTPUTTYPE_WAVWRITER);
ERRCHECK(result);

char cPath[200] = {0};
[path getCString:cPath maxLength:200 encoding:NSASCIIStringEncoding];

result = system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, cPath );
ERRCHECK(result);

….

result = system->isRecording(0, &recording);

the call to isRecording fails with "FMOD error! (37) An invalid parameter was passed to this function."

  • You must to post comments
0
0

It looks like your are getting confused with writing the output of the FMOD system (i.e. everything you would hear) with the recording API for voice coming in the microphone.

If you just want to record voice to a file, take a look at the recording example and the offlinedecoding example.

If you want to write the system output to disk then the code you have should be right, use wavewriter, and pass in a file path to output to.

  • You must to post comments
0
0

In the documentation, it says that FMOD_OUTPUTTYPE_WAVWRITER is not supported on iPhone. Is this no longer the case?

  • George
  • You must to post comments
0
0

Correct, wave writer output is supported now. I will tidy up the docs to reflect this.

  • You must to post comments
0
0

Awesome. Can’t wait to use it. Thanks!

  • George

PS: It would be nice to have a PDF or HTML version of the docs. Right now, I am using iCHM to read the CHM format on my Mac.

  • You must to post comments
0
0

We recommend using xchm for Mac and Linux, it’s a freeware product that works quite well.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.