clean up audio recording

This commit is contained in:
12aw 2024-01-26 13:09:30 +01:00
parent 334677dde2
commit b20129f9cd
2 changed files with 18 additions and 18 deletions

View file

@ -41,19 +41,6 @@
"versionName": "1.7.8.8",
"outputFile": "monocles chat-1.7.8.8-git-x86-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 15903,
"versionName": "1.7.8.8",
"outputFile": "monocles chat-1.7.8.8-git-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
@ -66,6 +53,19 @@
"versionCode": 15901,
"versionName": "1.7.8.8",
"outputFile": "monocles chat-1.7.8.8-git-armeabi-v7a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 15903,
"versionName": "1.7.8.8",
"outputFile": "monocles chat-1.7.8.8-git-x86_64-release.apk"
}
],
"elementType": "File"

View file

@ -3152,15 +3152,15 @@ public class ConversationFragment extends XmppFragment
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && activity.xmppConnectionService.getBooleanPreference("alternative_voice_settings", R.bool.alternative_voice_settings)) {
mRecorder.setAudioSamplingRate(48000);
mRecorder.setAudioEncodingBitRate(64000);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.WEBM);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.OPUS);
} else {
mRecorder.setAudioSamplingRate(44100);
mRecorder.setAudioEncodingBitRate(96000);
mRecorder.setAudioSamplingRate(48000);
} else {
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC_ELD);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mRecorder.setAudioEncodingBitRate(96000);
mRecorder.setAudioSamplingRate(44100);
}
setupOutputFile();
mRecorder.setOutputFile(mOutputFile.getAbsolutePath());