After grabbing your source pcm data, you can pass it to FMOD either in a PCMReadCallback
or by copying it into a Sound
and playing that back as a programmer sound.
To copy into a sound you can use Sound.lock
to get a pointer to the sound’s buffer. Then you copy your pcm data into the buffer and unlock the sound with Sound.unlock
. There has been some discussion about this topic recently in another thread which is worth reading, and has examples of both the Sound.lock
approach. They ended up having issues with OnAudioFliterRead
and this is due to an old Unity bug that they have no plan of solving, but that shouldn’t be an issue in your case if you aren’t using OnAudioFilterRead
.