I have a pcm audio file, or byte array of this file. And i need to reverse it and play it.
If i just reverse byte array like this I'm getting noise, so i should reverse only raws or sample raws of pcm.
public void reverse(byte[] array) {
if (array == null) {
return;
}
int i = 0;
int j = array.length - 1;
byte tmp;
while (j > i) {
tmp = array[j];
array[j] = array[i];
array[i] = tmp;
j--;
i++;
}
}
I read a lot, but I didn't find any info of how i can do this.
Data in byte array stores like this(at oneDrive, cuz not enough reputation) : http://1drv.ms/1DJ0jDr
I'll apreciate any help. Thanks a lot!