
SAMPLING 2 / SAMPLE RECORDER
----------------------------

Records the incoming live audio to a standard ED BLOB v2 sample.

Gate, when activated, starts the recording process.
Once Gate returns inactive, recording stops and the recorded sample is transmitted.




ABOUT MEMORY ALLOCATION
-----------------------

Since the final length of the recorded sample usually can't be known in advance, a memory buffer is dynamically allocated with a minimal chunk size specified with the Chunk Size pin (min 48,000 samples). Every time the buffer length is exceeded while recording, an additional chunk of the same size is allocated on the fly, and so on.
Since dynamic allocation and relocation may represent an important CPU overhead depending on the architecture and on the available RAM, it is advisable to set Chunk Size intelligently. A larger chunk has less chances of being exceeded while recording, but once this happens, allocating new memory and copying the previous buffer content to the new pool can be quite CPU expensive. A smaller chunk size has more chances of being exceeded and more frequent relocations will occur while recording, despite they are perhaps less CPU expensive.

Again, plan your chunk size carefully: if you know approximately the maximum recording length of your application, or if you have imposed such a maximum, simply use that length as chunk size, so that no relocations will occur.

