I am developing an app that records audio from microphone to integer array. Array is then passed to FFT and MFCC. I need to make frames about n samples and I need to 50% overlaps them (they cannot be side by side). So I need 3 buffers - when the first is full is passed to FFT. I this moment app should record second half of second buffer and first half of third buffer. FFT will be separate thread (my idea).
So I tried to sample audio using QAudioRecorder
and QAudioProbe
. I connected audioBufferProbed
signal with processBuffer
and there i use buffer.constData<int>()
. I seems it works. I understood audioBufferProbed
is emitted when buffer is full.
I don't know how to associate more buffers with one recorder. Or start writing to second buffer too at half of first buffer.