steps:
- Use
read(byte[] audioData, int offsetInBytes, int sizeInBytes)
to get audio into a byte array. - Separate two channels by copying every other byte into two different byte arrays.
- Save two byte arrays as a mp3
- Play any of them.
for step 3,4
String path = "path to new mono mp3 file";
File mp3File = new File(path);
FileOutputStream fos = new FileOutputStream(mp3File) ;
fos.write(byteArray);
fos.close();
mediaPlayer = MediaPlayer.create(getApplicationContext(),Uri.fromFile(mp3File));
mediaPlayer.start();