Thank you for the project, it greatly helped in testing!
Some things I tested:
- Artifacts
- Moved the
CaptureFrame()
function fromUpdate()
toFixedUpdate()
to remove the dependence on frames. - Decreased the size of the default
DSP Buffer Length
(Unity Integration | Settings DSP Buffer Length Settings), I tested256
.
- Moved the
- Latency
- Reducing the size of the buffer created in the
exinfo
exInfo.length = SampleRate * PCMMultiplier;
, I tested halving this value.
- Reducing the size of the buffer created in the
Another option maybe using a FMOD_SOUND_PCMREAD_CALLBACK
(FMOD Engine | Core API Reference - FMOD_SOUND_PCMREAD_CALLBACK) which would further decouple the recording from the frame rates and more closely attach it to the FMOD system.
Thank you for the explanation.
Let me know if that makes a difference!