I’m recording sounds and saving them into a byte[] buffer. Now I want to compare every single element of those two list, to know how different they are. Could anyone tell me wich is the best method to do that? I have read on here Array.equal(array1,array2), but I want to compare just two elements in each iteration and I want the position of the different bytes as well.
Share
If you are storing the bytes in a byte[] array, why not do a classic a[i] == b[i] comparison? Or whatever operation you intend to perform on the two bytes.
If performance is an issue (say for very large byte arrays, which I can foresee for sound streams), there are plenty of parallel methods for speeding up the process.