Is there a way to save the output from the mixer to a WAV file or similar and still allow the user to hear the audio at the same time?

I can use the WAVWRITER output but enabling that cuts out the default output.

Am I missing an option?

I’m developing on iPhone by the way.


  • Richard Lawler
  • You must to post comments

Hi richardl,

It’s not too hard to write out a wav file while playing back audio. Take a look at the recordtodisk example.

The example shows you how to write a header for a wav file. You should be able to get all the information you need for those fields from the FMOD::System object.

The example uses Sound::lock fwrites the data to file. Instead of doing that you would probably use custom DSP callback to capture the sound and fwrite from the callback. Take a look at the dsp_custom example to see how to write a FMOD DSP unit. The DSP unit would be quite simple, something like this:[code:b63uxfff]
memcpy(outbuffer, inbuffer, length * inchannels); //pass data through
fwrite(inbuffer, length * inchannels, 1, file);[/code:b63uxfff]


  • You must to post comments

Ah. Very good. I was thinking there was some way to do this with a callback.

I’ll give that a try.


  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.