Where should I perform File IO workload in PortAudio if not in the callbacks -


i using portaudio record multichannel audio data. want save data each channel separate file. therefore, have file io work somewhere in program. since document recommend not doing io work in callback function since called in high frequency.

then, right way perform io work ? should start thread?

thanks in advance time on reading post!

this do:

1) have buffer each channel. these buffers storage buffers , not ones have in callback. i'd suggest declarinng these buffers in padata structures. you'll have decide buffer length according how storage have or time limit.

2) when stop recording, have call method file io work.

3) use buffers had step 1 , write file.

4) repeat


Comments