[fpc-pascal] TFileStream.WriteBuffer() and RAM used ?

fredvs fiens at hotmail.com
Thu Dec 8 14:54:34 CET 2016


Hello.

In a audio library, it uses a buffer to record audio.

There is a main loop that store the audio-data given by the audio-input
device into the buffer.
For this TFileStream.WriteBuffer() is used.

Ok, all works well.

But I noted that the ram used increase at each loop and when the max ram is
reached, the program crash.

How must I deal with Data.WriteBuffer(), must I write it to a temp file ?

I was thinking that the memory manager will do the job when
TFileStream.WriteBuffer() is called.

But it seems not.

All advice are welcome (with code even better ;-)).

Many thanks.
Fred



-----
Many thanks ;-)
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TFileStream-WriteBuffer-and-RAM-used-tp5727062.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.


More information about the fpc-pascal mailing list