I need to do some EQing and apply a digital effect for a .wav file. Is there any way of extracting individual PCM sample values from "buffer" below to carry out some EQ/processing? Is AudioTrack the right way to do this?
private void playSound() {
audioTrack.play();
double input = 0;
int bufferSize = 512;
byte[] buffer = new byte[bufferSize];
InputStream inputStream = getResources().openRawResource(R.raw.wave);
try {
while((input = inputStream.read(buffer)) != -1)
audioTrack.write(buffer, 0, input);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}