Record for Unknown Amount of Time

I initiate my sound-info variable by doing:

FMOD_CREATESOUNDEXINFO soundInfo;

and I want to know how to set the length field of soundinfo to an undefined setting so that I can record for an unknown amount of time (and then analyze the recorded audio).
Is there anyway to do this?
Or is there any preferred way to achieve recording for an unknown period of time?

Any help is greatly appreciated, thanks!

There is no way to pass an unlimited length buffer to the FMOD recording API.

FMOD will wrap-around the record buffer. If you pass a small (a few seconds) buffer, you can poll getRecordPosition() at regular intervals to track how much data has been added to the buffer, then use sound::lock()/unlock() to read out the new data and store it yourself in a way that allows infinite recording.