I have just been doing a bit of work on the linear beamformer
Which works apart from a slight clicking which I know what it is as there is an offset somewhere on each chunk that means there is a slight mismatch.
If you cut an audio signal or mismatch so its not smooth then it will create clicks and I am looking at the code and just not seeing where in the indexing this is happening.
They way a linear delay sum works is for that chunk it works out TDOA (Time Difference of Arrival) in samples from the ref mic and it picks from the other mics ±samples and just sums and provides the average.
There is a margin constraint that is set to the physical max of the distance of the 2 mics as possible to not detect tdoa and get out of sync.
Also the margin length *2 of the last chunk is added to the next chunk as the delay sum can me ± samples so we work on the chunk + 2x margin lengths and start work a margin in.
Anyway the actually beamformer is really simple and it could just be a dropped sample and I am just not seeing where the indexing is wrong.
If you know a smattering of C or Java maybe have a look for me as the Delay is the really simple part and I am doing something stupid where I am just out of align with the indexes.
Maybe a fresh set of eyes can see it as know when I spot it I will kick myself but just not spotting it.
PS I know I keep mixing C/C++ syntax and for a guru this must be hack hell but its my 1st from scratch C/C++ project but ignoring syntax as its not that there is definitely an index offset causing this and I am just not seeing where.
I guess I will just have to create a synthetic wav of an incrementing float and pass that through to see where its happening by results but would rather not write all the additional but may have too.
I added some debug lines and prob need to give it a rest as its not making much sense at the moment
i=4410 tdoa=0 j=0
i=4410 tdoa=-1 j=1
i=4411 tdoa=0 j=0
i=4411 tdoa=-1 j=1
i=4412 tdoa=0 j=0
i=4412 tdoa=-1 j=1
i=4413 tdoa=-1146436736 j=0
i=4413 tdoa=-1 j=1
i=4414 tdoa=-1146436736 j=0
i=4414 tdoa=-1135547904 j=1
i=4415 tdoa=-1146436736 j=0
i=4415 tdoa=-1135547904 j=1
i=4416 tdoa=-1146436736 j=0
i=4416 tdoa=-1135547904 j=1
i=4417 tdoa=-1146436736 j=0
i=4417 tdoa=-1135547904 j=1
sample max amplitude = 0.662743
sample average = 0.183766
255.458 ms
4410 is the chunk size so why I go awry @ 4413 and its just the end 4 samples is confusing me