El 09/12/2016 a las 12:15, fredvs escribió:
Hello.

Thanks Michael for answer.

What happens with the buffer in which you had data, this we do not know.

Here is the schema of recording:


Hello,

You working schema for recording is memory related, you must transform it in a static approach based in expected requirements. In other words, you are about to write a WAVE, in a regular PC you can grab it directly to the TFileStream from InputBuffer, if you are in a very low power device you can use a doble buffer and if your requirements are a low power PC with very high bitrate spike you must swap to threading model (but it is overkill for almost anything nowadays).

It you don't want to directly write to TFileStream use the double buffer, let the audio grabber write in a block of memory while you dump the other one to TFileStream. It is quite difficult to show an example because I do not known the API you are using to grab the audio, most of them work with callbacks, some blocks execution, and others uses Windows events. If execution in API is blocking your thread I'm quite sure there is another one that do not block it.

--

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to