And in the example of a 600ms input, it should be calculating the loudness for 0-400 ms and then 200-600 ms. Because in the code it looks like it might be doing 0-400ms and then 400-600ms. But again I might just be following along wrong - the #define macros made it hard to debug and follow along
ebur128_calc_gating_block in line 390 is always called with samplerate*2/5 (400ms) as a parameter. So it will always analyse the last 400ms for each new block. A bit difficult are lines 256-275: I must check if the last 400ms "wrap around" the circular buffer, and handle that case separately.
The first block differs from the others. This is probably because the filter states must get filled.
I looked at the code again and it's definitely not doing any sort of window overlap. It's treating each 200ms block of audio separately, except for the first block which is done as 400ms. We should get this fixed. Unfortunately, the IIR filter code is writing the filtered data back into the audio_data buffer. In order to do overlapped windows, you'd need to keep the audio intact as each sample will be used twice. One simple solution would be to do the sum-of-squares inside the filter function, so that you don't need to store the filtered audio.
Just to be clear, this is essentially what needs to be done for overlap. For the sake of clarity, let's use a 1000Hz sampling rate.
ebur128_filter_double(st, &audio_data[0], 400);
ebur128_filter_double(st, &audio_data[200], 400);
ebur128_filter_double(st, &audio_data[400], 400);
ebur128_filter_double(st, &audio_data[600], 400);
/* etc. */