I found this old test sketch that I wrote a couple of years ago. I think it might do exactly what you are asking about. As it is it doesn't do anything useful:

1: It takes an Audio block, and concatenates it with the previous block to form a data buffer of length 256, windows it with a length 256 Hanning window, and takes the FFT.

2: There is no FFT processing done in this test sketch...

3: It then computes the inverse FFT, and reconstructs the data sequence in length 128 blocks using overlap and add.

It was written to examine the envelope of the reconstructed waveform of STFT (Short Term Fourier Transfom) with 50% overlap. If you look at the output on a scope you'll see it's perfectly uniform.

This version uses arm_rfft_fast_f32() for the FFT's. This is not available in the Teensyduino arm_math - you will have install an updated version of arm_math. It also has a different input/output data format. It shouldn't be difficult to substitute whatever FFT you are using.

Code:

//------------------------------------------------
//
#include "AudioSTFT.h"
#include <Audio.h>
#include <SerialFlash.h>
//
///
// --- Audio Board setup
AudioSynthWaveformSine sine;
AudioSTFT stft;
AudioOutputI2S output;
AudioControlSGTL5000 codec;
const int myInput = AUDIO_INPUT_LINEIN;
//
AudioConnection c1(sine,0, stft,0);
AudioConnection c5(sine,0, output,0);
AudioConnection c6(stft,0, output,1);
//
// --
void setup() {
Serial.begin(115200);
delay(2000);
AudioMemory(12);
codec.enable();
codec.volume(0.5);
AudioNoInterrupts();
AudioInterrupts();
sine.frequency(300);
sine.amplitude(0.8);
AudioInterrupts();
//
}
//
// ---
void loop() {}

Code:

//----------------------------------------------------------------------------------------------
// AudioNoiseReduction.cpp
//
// Function: Teensy Audio Board STFT (short-term-Fourier-Transform) test with 50%
// overlapping FFT windows.
//
// Author: Derek Rowell
//
// Date: Jan 17, 2018
//
// Notes; 1) This version uses the arm_math arm_rfft_fast_f32() FFT routines, which are not provided
// in the old version of the arm DSP library in the standard teensyduino distribution.
// In order to compile this code you will need to install a later version.
// 2) This version uses a length 256 FFT with a Hanning window and 50% overlap of adjacent
// sections to provide the 128 sample processing blocks for the Audio Board
// 3) This is a "do nothing" test sketch just to look at the overlap/add reconstruction
//
//----------------------------------------------------------------------------------------------
//
#ifndef audio_stft_h_
#define audio_stft_h_
#define Nfft 256
//#include "AudioStream.h"
#include "Audio.h"
#include "arm_math.h"
#include "Arduino.h"
//--
class AudioSTFT : public AudioStream {
public:
AudioSTFT() : AudioStream(1, inputQueueArray){
arm_rfft_fast_init_f32(&fft, Nfft);
arm_rfft_fast_init_f32(&fft_inv, Nfft);
for (uint16_t i=0; i<Nfft; i++) {
hanning[i] = 0.5*(1.0 - cos(2*3.14159*(float(i)/float(Nfft))));
}
}
//--
virtual void update(void);
//--
private:
arm_rfft_fast_instance_f32 fft;
arm_rfft_fast_instance_f32 fft_inv;
audio_block_t *inputQueueArray[1];
float y[Nfft] = {0.0}; // input buffer
float y_prev[Nfft/2] = {0.0}; // prior input buffer
float Y[Nfft] = {0.0}; // FFT of input
float hanning[Nfft];
float y_out[Nfft];
float y_out_prev[Nfft] = {0.0};
};
#endif

Code:

//----------------------------------------------------------------------------------------------
// AudioNoiseReduction.cpp
//
// Function: Teensy Audio Board STFT (short-term-Fourier-Transform) test with 50%
// overlapping FFT windows.
//
// Author: Derek Rowell
//
// Date: Jan 17, 2018
//
// Notes; 1) This version uses the arm_math arm_rfft_fast_f32() FFT routines, which are not provided
// in the old version of the arm DSP library in the standard teensyduino distribution.
// In order to compile this code you will need to install a later version.
// 2) This version uses a length 256 FFT with a Hanning window and 50% overlap of adjacent
// sections to provide the 128 sample processing blocks for the Audio Board
// 3) This is a "do nothing" test sketch just to look at the overlap/add reconstruction
//
//----------------------------------------------------------------------------------------------
//
#include "AudioSTFT.h"
#define forward 0
#define inverse 1
//--
void AudioSTFT::update(void) {
audio_block_t *block0;
block0 = receiveWritable(0);
if (!block0) return;
//
for (int i=0; i<Nfft; i++) {
if (i < AUDIO_BLOCK_SAMPLES) {
y[i] = y_prev[i]; // Move to end of input buffer
} else {
y[i] = float(block0->data[i-AUDIO_BLOCK_SAMPLES])/(32768.0);
y_prev[i-AUDIO_BLOCK_SAMPLES] = y[i]; // For the next iteration
}
}
// Take windowed FFT of the input to form Y[k]
for (int i=0; i<Nfft; i++) {
y[i] *= hanning[i]; // Window with a Hanning data window (raised cosine)
}
//
arm_rfft_fast_f32(&fft, y, Y, forward);
// Note: The arm_rfft_fast_f32() function destroys the data in the input buffer :-( (see above)
// arm_rfft_fast_f32() takes a real input buffer of length Nfft, and returns a complex array of
// length nFFT containing nFFT/2 complex variable. It is assumed that the nFFT/2 missing samples
// are defined through the conjugate symmetry of a Real FFT.
// -------------------------------------------------
// We only need to work on half the FFT because of symmetry. Y[0] is a special case.
// *** Do freq. domain processing here ***
// Don't process k = 0 (contains DC and Nyquist frequency)
// -------------------------------------------------
// Translate back into the time domain and "stitch" (overlap/add) to the output from the previous segment
arm_rfft_fast_f32(&fft_inv, Y, y_out, inverse); // Compute the inverse FFT
//
// "Stitch" (overlap/add) to the output from the previous segment
for (int i=0; i<Nfft; i++) {
if (i<AUDIO_BLOCK_SAMPLES) {
block0->data[i] = (int)((y_out[i]+y_out_prev[i])*32767.0); // Overlap/add
} else {
y_out_prev[i-AUDIO_BLOCK_SAMPLES] = y_out[i]; // Save for next overlap/add
}
}
transmit(block0, 0);
release(block0);
}