Skip to content

Commit

Permalink
Revert "changed audio codec and sampling + bit rates (#74)" (#75)
Browse files Browse the repository at this point in the history
This reverts commit 76b17dc.
  • Loading branch information
GP authored Aug 16, 2019
1 parent 76b17dc commit e1fe988
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,12 @@ private static void makeRecording(Context context, long recordTimeSeconds, boole

// Sampling configuration
mRecorder.setAudioChannels(1);
mRecorder.setAudioSamplingRate(48000);
mRecorder.setAudioSamplingRate(16000);

// Encoding configuration
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); // MPEG_4 added in API 1
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC); // HE_AAC added in API 16 (JELLY_BEAN)
}else{
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); // AAC added in API 10
}
mRecorder.setAudioEncodingBitRate(384000);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); // AAC added in API 10
mRecorder.setAudioEncodingBitRate(256000);

mRecorder.prepare();

Expand Down

0 comments on commit e1fe988

Please sign in to comment.