2013-11-22 102 views
0

我想從我的android應用程序錄制音頻。一切運作良好。最近,我不得不將輸出格式從MPEG4更改爲AAC_ADTS。問題是AAC_ADTS不適用於其中一個設備它在另一個設備上工作。所以,我的問題是AAC_ADTS格式僅適用於某些Android版本。如何從所有設備獲取以AAC_ADTS格式錄製的音頻?請幫助MediaRecorder OutputFormat的Android音頻錄製問題AAC_ADTS

mRecorder = new MediaRecorder(); 
     mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
     mRecorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); 
//  mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); 
//  mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); 
     mRecorder.setOutputFile(mFileName); 

     mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); 

回答