PCM to AAC conversion using mediacodec
I am using a media codec class in Android (Jelly Bean) to encode PCM format to AAC. The file was encoded but no music player is able to play that file. I was not able to find any working code or proper documentation on the net. This is my code: public void doConvert() { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { try { int codecCount = MediaCodecList.getCodecCount(); for ( int i=0; i < codecCount; i++) { MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i); Logger.getLogger(MainActivity.class.getSimpleName()).log(Level.INFO, info.getName());