After a lot of research, I can't find a clear answer. What I want to achieve is: take an mp3/wav file and save its left and right channels to 2 byte[]. Then I can manipulate each channel and then add them up again and create a new wav file. (preferably the solution to be in Java)
Related question is split two channels of AudioRecord of CHANNEL_IN_STEREO. However this is using audiorecord, how to apply it to reading from audio file?
Thanks
Well here is the program to read a 16 bit wave file
Sample Audio: http://freewavesamples.com/korg-triton-slow-choir-st-c4
Data Packing for 16-Bit Stereo PCM: Sample 1
Channel 0 | Channel 0 | Channel 1 | Channel 1
(left) | (left) | (right) | (right)
low-order | high-order | low-order | high-order
byte | byte | byte | byte
And printing it in CSV format. I will not put the CSV writer code here. Its already available here.