Record fmod in an video

ScriptUsageDspCapture creates a custom DSP which is placed on the FMOD System’s Master Channel Group, with a custom static read callback CaptureDSPReadCallback(). The read callback is called by the FMOD System with every mixer update and receives the audio signal that flows into the DSP, allowing you to directly access and/or modify the signal.

Additionally, you also pass the entire instance of the class ScriptUsageDspCapture to the DSP as user data. The class instance is then accessed from the user data within the callback, and the incoming audio signal is copied to the class member mDataBuffer. The data copied to mDataBuffer within the callback is then processed in ScriptUsageDspCapture.Update().

In the case of the scripting example, the data is used in Update() to draw the signal’s waveform, but for your purposes you’d instead want to accumulate all of the audio data and then presumably save it to file - that’s where the response linked in the other thread regarding writing to .wav comes in: record and output to .wav file - #2 by mathew