I use libflac.dll (streaming mode) to encode a lot of small waveforms.
Speed is very important, therefore I would like to reuse an encoder without re-initializing everything.
Ideally I would like 2 (exported) functions: "flush" and "restart".
"Flush" is self-explanatory, should properly end the encoding. I could split myself "flush" from "finish", it looks relatively simple.
"Restart" should keep all current settings, generate a new stream header and clear everything for a new stream.
It' clear that current settings, re-creating windows, cpu-dependend functions, etc could be kept around.
I was not quickly able to extract all the necessary initializations from "init_stream_internal_
" into a new "FLAC__stream_encoder_restart
" function.