# Record for Unknown Amount of Time

**URL:** <https://qa.fmod.com/t/record-for-unknown-amount-of-time/11571>\
**Category:** FMOD Engine\
**Created:** [July 24, 2014, 12:52am UTC](https://qa.fmod.com/t/record-for-unknown-amount-of-time/11571 "2014-07-24T00:52:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbird](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@paulbird](https://qa.fmod.com/u/paulbird)\
**Post date:** [July 24, 2014, 12:52am UTC](https://qa.fmod.com/t/record-for-unknown-amount-of-time/11571/1 "2014-07-24T00:52:37Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [July 24, 2014, 6:52am UTC](https://qa.fmod.com/t/record-for-unknown-amount-of-time/11571/2 "2014-07-24T06:52:23Z")

</div>

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.
